|
Subject: Re: Mercurial vs git Newsgroups: gmane.comp.version-control.mercurial.general Date: 2007-01-05 19:22:51 GMT (1 year, 47 weeks, 4 days, 1 hour and 48 minutes ago) > Viz complexity, the cogito suite (that wraps around git) completely > hides the index, hides a lot of other things, and provides as simple an > interface as hg. Also, with git, just do git commit -a (assuming > .gitignore is correctly set up) and forget the index exists. There is a > lot of power to having the index, but you aren't forced to deal with it > if you don't care. Sacrificing needed functionality to gain simplicity > is a bad tradeoff, and that is the essence of the git / hg differences > for me. I would *not* recommend the use of cogito; it does things sufficiently differently from git that in the long run, your users will be running into traps. Git 1.5.0 (in prelease) has been simplifying things so that cogito is less necessary, and folks who get trapped into cogito will in the long run be more confused. You still need to remember the index. If you create a file foo.c, do a "git add foo.c", and then modify foo.c, "git commit -a" will *not* do what you expect. It will commit the version of foo.c at the time that you executed the the "git add foo.c" command. If you subsequently modify foo.c, you have to remember to re-execute the "git add foo.c" command, or use the "git update-index" command. > >git branch -d : clone -r > > hg clone -r is much less capable, requires a lot of fiddling, etc. to do > the equivalent of git -D tmp/stupidbranch while keeping the 50 other > branches and all history. The real question here is how do you do your development. With mercurial, typically experimental work which is yet to be merged into the mainline repository is simply kept in a separate directory with a separate repository. Other people will use patch queues, either by using quilt or mercurial queues (mq) to maintain work that hasn't been merged into the production tree. Some folks prefer to store patches in a "git topic" branch and then constantly use git rebase to rewrite history. I find this is actually more confusing, but it's really a matter of what individual developers feel comfortable with. The problem with a big project with a lot of developers is the choice of a particular SCM can sometimes force certain workflows onto all of the developers. So before trying to choose between git and hg, you might want to take a step back and consider the workflow that *ALL* of the developers will be comfortable with. Clearly your git champion is comfortable with git-optimized workflows, and as long as he gets to control the criteria, he will get to control the outcome. It's like choosing a car --- is the criteria, "will contribute least to global warming", or "can cross 3 feet of standing water"? One choice will dictate the Prius; the other an H1 Hummer.... > I am not reverting a single checkin, not necessarily even a simple > sequence. Could be commits 1 4 8 12 on a branch with 23 other things. > Also, git rebase is essential in the process. Keep in mind, we do not > actually do linear development, things do not happen in a particular > order and we need the tool to let us merge things in the order we need, > not the order convenient to the tool. This is a developer workflow question again. "git rebase" is one way to do things, but it's certainly not the only way. If you use "git rebase" and you have to deal with a merge conflict, git does ***NOT*** have any good tools for dealing with it. You end up using very manual commands to resolve the conflicts. In general, Hg has much better intergration with graphical merge tools than git does. (Probably because Linus doesn't have much use for graphical merge tools. |
|
|