According to the manual, git dcommit “will create a revision in SVN for each commit in git.” But is there a way to avoid multiple Subversion revisions? That is,
The command git rebase -i can do this, and more. This command is extremely powerful, so it's good to make friends with it.
The syntax is: git rebase -i . This brings up your text editor, with options (and instructions) for modifying all the commits up to (not including) the given ID.
For example, to modify the previous 5 commits, you can do this:
git rebase -i HEAD~5
Or if your SVN branch is called "svn/trunk", then this syntax is good too:
git rebase -i svn/trunk
Then a text editor window will pop up. To squash everything, change the first word of every line after the first from "pick" to "squash" (If this sounds confusing- it will make more sense when you see it). Then save and close the editor. You'll then have a chance to edit the commit message for the squashed commit.
Among the other things you can do with git rebase -i, are reordering commits, squashing commits in different ways, and removing commits.
I use this command constantly; it's a killer feature of Git.