Some of the workflows i like (and use) is something like this :
- Interrupted workflow (taken from git-reset man page)
- Suppose you are interrupted by an urgent fix request while you are in the middle of a large change. The files in your working tree are not in any shape to be committed yet, but you need to get to the other branch for a quick bugfix.
$ git checkout feature ;# you were working in "feature" branch and $ work work work ;# got interrupted $ git commit -a -m 'snapshot WIP' (1) $ git checkout master $ fix fix fix $ git commit ;# commit with real log $ git checkout feature $ git reset --soft HEAD^ ;# go back to WIP state (2) $ git reset (3)
Isn’t that wonderful ! I was trying out svn + quilt. But very hard to manage.
Some resources :
- http://git.or.cz/course/svn.html – For SVN users : Understanding GIT.
- Fredrico : http://www.gnome.org/~federico/misc/git-cheat-sheet.txt
- git-svn man page : http://www.kernel.org/pub/software/scm/git/docs/v22.214.171.124/git-svn.html
- Nice starter git-svn tutorial : http://tsunanet.blogspot.com/2007/07/learning-git-svn-in-5min.html
- https://wiki.bnl.gov/dayabay/index.php?title=Synchronizing_Repositories#GIT_and_SVN (good one ! )
- http://youtube.com/watch?v=4XpnKHJAok8 – Linus talk ‘on’ GIT in Google (*not* how to use GIT)
My GIT Ref Card :
# Initialize a repo (like git init):
git-svn init http://svn.foo.org/project/trunk
# Fetch remote revisions:
# Create your own branch to hack on:
git checkout -b my-branch remotes/git-svn
# Merging in master.
git merge --squash foo-branch-name
# Do some work, and then commit your new changes to SVN, as well as
# automatically updating your working HEAD:
# Something is committed to SVN, rebase the latest into your branch:
git-svn fetch && git rebase remotes/git-svn
GIT is fast (super fast) ! and git-svn helps you if you are _stuck_ with svn !
Now GIT has moved out of my ‘staging area’ to everyday use. Yay!! I use it for GNOME/Evolution (and GNOME just moved to SVN a few months back 😉 )