Reputation: 5338
Let's assume I have cloned an existing SVN repository using git svn clone
and want to push the changes I make to the new ("forked") upstream Git repository.
At the same time, I want to be able to "pull" any changes from the upstream SVN repository and push them to the upstream Git (the repositories may diverge, but conflicts are unlikely).
svn diff
) and applying it to the Git repository?master
in a single step?Upvotes: 0
Views: 693
Reputation: 38136
For your questions:
1.If it’s ok to apply all the commits which is not exist in the local git repo, you can use git svn rebase
. If you’d like to apply these commits one by one, you can use git svn fetch
and then git cherry-pick commit
.
2.Two steps can meet your requirement:
git svn fetch
git rebase --onto master <start commit> <end commit>
It will rebase the range from start commit (not contain it) to end commit (contain it) on master branch.
Upvotes: 2