+7  A: 

I think it's because you used --squash. I'm not sure why you did, but you shouldn't need to. From the --squash documentation for git merge:

Produce the working tree and index state as if a real merge happened, but do not actually make a commit or move the HEAD, nor record $GIT_DIR/MERGE_HEAD to cause the next git commit command to create a merge commit. This allows you to create a single commit on top of the current branch whose effect is the same as merging another branch (or more in case of an octopus).

Basically, you need to do a "proper" merge. Squashing seems to have a rather specific usage situation (one that I've never had, so I can't really comment on why it's useful). I guess it's if you don't want the branch tree to look messy if you did some work in a branch but then decided to just merge it into a different branch that you're doing more overarching work in.

Peter Cooper
Thanks... I'm using --squash because I know that "git svn dcommit" creates an SVN revision for each commit on the master branch, and I only want one.You mentioned (in your git merge doc quote) that --squash doesn't "record $GIT_DIR/MERGE_HEAD to cause the next git commit to create a merge commit" .. I'm going to look more into what *does* record MERGE_HEAD - sounds like if that's there, the right thing might happen.
Bryan Stearns
Ahh, I forgot you mentioning git-svn. I switched cold turkey from SVN to Git unfortunately, so I can't add anything useful, but best of luck!
Peter Cooper
+3  A: 

Just don't use git merge --squash :)

Piotr Findeisen
+1  A: 

To add onto Peter Cooper's answer (comments weren't long enough):

git rebase --interactive (while chainsaw dangerous: see http://tomayko.com/writings/the-thing-about-git for more info and some background on why you'd ever want to use it) will let you squash and reorder individual commits before dcommitting them to svn. I use it a lot to help merge together 10-12 intermediate commits into 3-4 patchsets before dcommitting back to the repo.

Try git rebase --interactive HEAD~10 to interactively rebase the last 10 commits on your current branch. It's pretty rad once you learn it, and I use it daily on my git svn repo.

cbowns
Instead of HEAD~10, I'd use the name of the upstream branch, i.e. git rebase -i master. (or what ever your branch name is) That way you won't accidentally edit history you've already published.
Antti Rasinen
+1  A: 

After you do your squash merge then you need to manually tell git about your merge because after you dcommit git forgets. The way to tell git manually about your merge is to use git grafts. link text

rado