I\'ve got eight commits on a branch that I\'d like to email to some people who aren\'t git enlightened, yet. So far, everything I do either gives me 8 patch files, or start
This is an adaptation of Adam Alexander answer, in case your changes are in master branch. This do the following:
laura@rune:~/example (master)$ git branch tmpsquash ba3c498878054e25afc5e22e207d62eb40ff1f38
laura@rune:~/example (master)$ git checkout tmpsquash
Switched to branch 'tmpsquash'
laura@rune:~/example (tmpsquash)$ git merge --squash master
Updating ba3c498..40386b8
Fast-forward
Squash commit -- not updating HEAD
[snip, changed files]
11 files changed, 212 insertions(+), 59 deletions(-)
laura@rune:~/example (tmpsquash)$ git commit -a -m "My squashed commits"
[test2 6127e5c] My squashed commits
11 files changed, 212 insertions(+), 59 deletions(-)
laura@rune:~/example (tmpsquash)$ git format-patch master
0001-My-squashed-commits.patch
laura@rune:~/example (tmpsquash)$ git checkout master
Switched to branch 'master'
laura@rune:~/example (master)$