Combine local Git commits into one commit for git-svn

MacRae Linton picture MacRae Linton · Sep 11, 2009 · Viewed 8.6k times · Source

Currently, when I run git svn dcommit git creates a separate commit in SVN for every local commit I've made since last syncing with SVN. Is there any way for dcommit to instead combine all my recent local commits into one commit for SVN?

Answer

Jason Punyon picture Jason Punyon · Sep 11, 2009
git rebase remotes/trunk --interactive 

should bring you to the menu where you can pick commits or squash them all into 1 commit in order to avoid polluting your svn repository. This is a really good (but short) resource on working with git-svn.