Created
January 28, 2011 18:41
-
-
Save searls/800714 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I highly recommend experimental gitx: http://brotherbard.com/blog/ | |
#initial setup | |
git config --global core.autocrlf true | |
git svn clone -s https://path/to/repo cilp | |
cd cilp | |
git svn fetch | |
git svn show-ignore >> .git/info/exclude | |
#creating a branch to work on a feature for a production branch | |
# list the remote branches | |
git branch -r | |
# Usage: git checkout -b <feature name> [remote branch name] | |
git checkout -b my-feature-branch 1.8.0_branch | |
# Heads up! If git tells you that every line of dozens of files have changed, it's because many files are committed with Windows line breaks. Follow the instructions under "I just cloned and git says files have changed!" at this URL: http://help.github.com/dealing-with-lineendings/ | |
# Task: committing work done in a topic branch to the remote svn production branch | |
git checkout my-feature-branch | |
#make & commit codez | |
git svn rebase | |
git checkout -b 1.8.0 1.8.0_branch | |
git merge --squash my-feature-branch | |
git commit -m 'Message!' | |
git svn rebase | |
git svn dcommit | |
git checkout my-feature-branch && git merge --no-ff 1.8.0 | |
# Task: apply the changes to the 1.8 branch to the trunk | |
git checkout master | |
git cherry-pick 1.8.0 | |
#fix conflicts and stage them | |
git commit -c 1.8.0 | |
# Other great resources: | |
# http://www.viget.com/extend/effectively-using-git-with-subversion/ | |
# http://www.jukie.net/bart/blog/svn-branches-in-git | |
# http://blog.experimentalworks.net/2009/03/merge-vs-rebase-a-deep-dive-into-the-mysteries-of-revision-control/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sadly I have to punt and say "works for me", as my gitx ignores the files :|