开发者

Commit git-svn changes to SVN repo

we have a central SVN repo in our company. I use git-svn on my laptop to be able to use a repo, when I'm not connected to the company network. Now I was 3 weeks on a business trip and committed a lot to my local Git repo. There were also many commits to the SVN repo. When I try "SVN Rebase" I have to edit conflicts in each of my Git changesets. What I would like to do is just to commit all of my local changes at once and then edit conflicts only once.

I'm fairly new to Git, so I don't know how this is done properly and if this is the best way. I use TortoiseGit on Windows, so up to now I didn't really care a开发者_如何学编程bout the command line.

Thanks for your help.


Once you go through conflict resolution in git-svn rebase once you are in a new tree with new commits that include your resolutions. A future git-svn rebase will not encounter the same problems (unlike repeated merges, which is where rerere comes in handy).

If by "commit all my local changes at once" you mean you want to fold all of your commits into a single commit in git (and later SVN) then you can use git rebase -i to "squash" all of your commits into a single commit. You should not include any revisions that have already been sent to SVN with dcommit in that rebase -i because you are rewriting history. You will still have to resolve conflicts when you git-svn rebase just like you would if you were using only SVN and did svn update.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜