The setup (what you should avoid):
git checkout -b feature
hack, hack, hack, merge with changes on master, etc
git checkout master
git merge feature
git svn dcommit
My experience at this point was that the first changeset from the merge was successfully committed to svn followed by the rebase failing. Dcommit actually will commit each revision independently and rebase between them. I was left in interactive rebase. Instead of trying to clean this up iteratively by running through all the changesets I did the following:
(this is still on the master branch)
git rebase --abort
git reset --merge
git svn rebase (to get the commit that made it to svn)
git merge --squash feature
git commit -m "Here's my feature for all you svn users!"
git svn dcommit
This will successfully push ONE commit with all your remaining changes up to svn. Hope this helps someone who finds themselves in this situation. I also expect to have to read this again next time I forget --squash. Happy coding!
No comments:
Post a Comment