Version control systems

Marc Weber marco-oweber at
Thu Aug 21 23:34:07 EDT 2008

Isaac see third

>  FWIW, I started a wiki page that tries a direct comparison between Darcs and 
>  Git:
>  Some mappings are simple, some are more complicated and will require 
>  adopting a different workflow.  I still recommend reading a tutorial, but 
>  this cheat sheet should be a good start if you don't want to spend much time 
>  to learn Git just yet.  Where no directly corresponding command exists or 
>  emulating it would be too messy, I try to hint towards other work flows.
>  I encourage everyone to add useful tips and examples both from users who 
>  already use Git and later on, once we have gathered more experience.  I 
>  believe that Git has some features which can improve our productivity and 
>  I'd like this page to also collect tips how to do so.

Hi Thomas: Great work! There is not much I could add (although I've used
git during the last weeks quite often..)

However I'm missing four small tips:

first man git-rev-parse (or git rev-parse help)

        HEAD HEAD^ HEAD^^ ..
        is equal to
        HEAD HEAD~1 HEAD~2 ..>

        So to drop one of the last ten commits (don't remember which one)
        git rebase -i HEAD~10 ...

second : you forgot to mention gitk. It helps you getting an overview
        about when which branches have been created

        You can use google pictures search to see how it looks like or just play
        around (try the script in my other post)..
        You can have a look at the history and branches easily.. You can even
        highlight commits by changes made to filepath (must be relative to repo
        path!) or by adding/ removing strings etc..
        And it's a nice tool to just keep all hashes in memory in case you mess
        up your repo by accident :-)

        But recent gitk can do more. When getting some conflicts on git
        merge or git rebase gitk --merge will show you all commits
        causing this conflict.

third: #git on freenode.. I bet you'll get help there as well..
        I got the last tip there as well
        < doener> MarcWeber: you could, for example, do "git log or git rev-list or gitk --left-right --cherry-pick A...B"
        lists all commits beeing present on the one or the other branch,
        but not in both

4th:   You should know one thing about git history
        There used to be no difference between
        git-log (now depreceated, does no longer work in the git git version)
        git log

          git log --help 
        = git-log --help 
        = man git-log (more convinient to type)

        The only execption: git-clone doesn't work in all cases, git clone does (?)
        (Don't ask me why)

git show commit-id:file is of interest as well (you told about git show)

Marc Weber

More information about the Glasgow-haskell-users mailing list