tech-repository archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: The essential problems of moving from CVS
On Sat, Jan 16, 2010 at 07:30:35PM +0000, David Holland wrote:
> Yes, the point of tools like topgit is to allow you to have lots of
> branches at once without getting them mixed up. If you commit the
> shell stuff on one branch and the sail stuff on another, they won't
> get mixed together; on the other hand, you have suddenly subscribed to
This, then, is no longer about topgit at all, but general workflows -- so I
am glad you've brought this up, because you could quite easily yourself
create two branches:
sh-stuff
sail
Because the index is "global" -- the changes you make (and I mean changes --
those things not yet commited to any branch) don't conceivably live on any
branch at all; they're in the index. So you're free to make as many
unrelated changes to each other as you like.
When it comes to *commiting* these changes though you then have to, using
"git add" decide:
* Which branch they belong on, and if you're not on that branch, to "git
checkout $BRANCH"
* Which files will form the commit(s).
Then just "git commit".
At this point, after you had commited stuff, your index may well still
contain changes for stuff on "sail" -- so you can then switch to that branch
instead and repeat.
In cases where you really do need a "clean slate" because you need to pull
from a branch upstream to your branch locally, but you don't wish to commit
these changes but rather save them for later, you can just "git stash" --
and, then when you've had to handle whatever you were doing, "git stash
apply" to bring those changes back again to continue working on.
> a whole pile of administrative overhead handling the branches. Leaving
> uncommitted changes in a working directory is much easier, but with
> git, and at least some of the other tools as well, that method no
> longer works. (Unless you make a separate clone for each thing; but
> with a tree the size of NetBSD that's not very desirable.)
No, not at all. See above. You decide for yourself whether you want to
make topic branches or not for your work; so how that is ever
"administrative overhead" is unclear.
-- Thomas Adam
--
"It was the cruelest game I've ever played and it's played inside my head."
-- "Hush The Warmth", Gorky's Zygotic Mynci.
Home |
Main Index |
Thread Index |
Old Index