CARVIEW |
Every repository with this icon (

Every repository with this icon (

Description: | the Ruby programming language, unofficial mirror (see the wiki for details) edit |
CommitterHowto
Ruby committer’s happy hacking life with github
Mise en place
% git clone git://github.com/shyouhei/ruby.git % cd ruby % git svn init -s --prefix=origin/ svn+ssh://svn@ci.ruby-lang.org/ruby % git svn fetch
This might take quite a while (YMMV). Take a cup of coffee. Or three.
After that your repository behaves as if you converted ci-repository directly into git.
Create a branch.
First take a look at
% git branch -r
and you will see many branches under origin/*. Of particular interest are
origin/trunk
(head of Ruby 1.9.x) and origin/trunk
(head of Ruby 1.8.x). Choose the appropriate branch for your hack and make a local branch from that:% git checkout -b my_feature origin/trunk
Here I chose
origin/trunk
for my feature’s upstream branch.
Enjoy your happy time.
You can use git normally, including creating other branches, merging, etc… You are a committer so I do not explain this stage since you probably know how.
Push your changes into upstream repository.
Once you are sure you should apply your changes worldwide, begin with:
% git svn rebase
This will bring your branch up to date with the upstream svn repository and rebase your changes. After fixing any conflicts you may commit your changes with:
% git svn dcommit
The changes are now in the official svn repository!
You can notice with git log
that git svn has appended to your commits a line with a “git-svn-id” that shows the svn revision number.
Another hack
Now go back to hacking. Enjoy!
Notes: deleting your local branch
Your local branch may be deleted after you have merged it into upstream repository. But you should not be on that branch when you delete that.
% git checkout trunk
% git branch -d my_feature