5/20/2023 0 Comments Gitk vs gitx![]() “If you deny the Index, you really deny git itself.” As this article from May 2006 reminds us then (and it is still true now): ![]() The trick is, you really need to understand the index to exploit fully Git. If you felt uncomfortable dealing with the index, you are switching for the better -) But in any case, this file is handled automatically.Īdditionally, it is possible to be more selective at commit time either by specifying the files you want to commit on the command line or by using the RecordExtension. Mercurial's rough equivalent is the DirState, which controls working copy status information to determine the files to be included in the next commit. The others may implement and hide it, but in no other case the user is aware nor has to deal with it. Git is the only DistributedSCM that exposes the concept of index or staging area. Note: one of the biggest difference between Git and Mercurial is the explicit presence of the index or staging area. Git no equivalent for re-merging that I know of. Hg hg resolve FILE (after a merge, attempts to re-merge the file) Git git status - files that merged cleanly are added to the index automatically, those that are not have conflicts Hg hg resolve -l (lists files with resolved/unresolved conflicts) Git git reset HEAD FILE to unstage the file Hg hg resolve -u FILE marks the file as having been unresolved Hg hg resolve -m FILE (marks the file as having been resolved by manually fixing up the conflict problem) :įor merge conflict resolution, the hg resolve command in Mercurial has a few options that change the behaviour: You can only do equivalent of hg pull hg log -r. Just to fill the blanks, some of the most useful commands from Mercurial: Git git checkout REVISION-KEY Hg hg update CHANGESET Git git format-patch RANGE Hg hg email -m filename -o Git gitk, git log origin/master.HEAD Hg hg outgoing Git git push URL git remote add origin URL Hg hg push URL $EDITOR. ![]() For git rebase -interactive there's hg histedit, or Mercurial Queues Git git gui Hg Mercurial doesn't ship GUI to select changesets, only console hg record command. Git git commit -v Hg hg diff | less hg commit git/config, ~/.gitconfig, use git-config to modify the values hgignore, syntax: glob is the same behaviour as git's. This list was cribbed from my own blog post when I went the other way (git -> hg). There are a few other gotchas between the two not mentioned there.
0 Comments
Leave a Reply. |