Syncing existing git with existing SVN repository -


okay, made mess. have svn repository code , have local git repository in work, branch, etc.. used commit things time time git svn using git-svn. got new computer , cloned git repository 1 other. tried use git-svn afterwards, due new version , me being not careful enough configuration somehow lost. used git svn init , clone history in svn, situation looks this:

o--z--o--....--x--o--o....--o  (master)    |    o--o--o--....--x (remotes/git-svn) 

x marking state in both repositories in same state (as master , git-svn in sync on old machine). now, i'd commit x head master svn repository, when use git svn dcommit -n shows diffs way z. how can sync git-svn , git , svn again (so can use dcommit commit stuff again)?

is possible go x , use git svn set-tree x (because current svn holds version) , go head git svn dcommit? don't want (blindly) try stuff on svn, there lot of more stuff in (by many other people) don't want screw up.

git svn dcommit looks in history of branch until finds commit message contains git-svn-id: line, it'll go z in case, observe. try rebase master branch onto remotes/git-svn. haven't tested this, following try:

 # make sure you're on master  git checkout master   # create new branch here save old branch  git branch old-master   # rebase after x on master tip of master  # onto remotes/git-svn  git rebase --onto remotes/git-svn <commit-id-of-x-in-master> master 

after that, history should like:

o--z--o--....--x--o--o....--o  (old-master)    |    o--o--o--....--x (remotes/git-svn) --o--o....-o (master) 

... , git svn dcommit should work expected - however, i'd try --dry-run first, sure.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -