Click here to register.
      

Resync’ing Subversion in Git

Design Squid
Resync’ing Subversion in Git
hao · 4/30/2009 10:31 pm

Last month, I showed how to put your Subversion data into Git. Now I will briefly describe how to resync the cloned Subversion data in your Git repository, in case you have not fully switched to using Git.

First, make sure your Git working copy is up to date:

cd /data/WebGUIAcme
git pull github master


Then resync your Subversion clone:

cd acme
git svn rebase


If your Subversion repository has changed since cloning, this last command should display several messages about which files were added or modified:

    M    lib/Acme/Cart.pm
r123 = 607c50c07af9cdb5d25b27d3dd53344e5b4c8dba (trunk)
    A    sbin/installAcmeCartSuperMagicFeature.pl
r124 = 10c2983703d2ebbc2f53481a64aed5d94072bfa7 (trunk)


Take note of the added files (indicated by “A”), since you’ll need to tell Git to add these:

cd ..
git add acme/sbin/installAcmeCartSuperMagicFeature.pl


Now you should be ready to commit and push:

git commit -a -m “Committing SVN revisions 123 through 124, for super magic cart”
git push github master


… and you’re done.

·
Stick
Lock
Subscribe