Another option is git merge --squash <feature branch> then finally do a git commit.
From Git merge
--squash
--no-squashProduce the working tree and index state as if a real merge
happened (except for the merge
information), but do not actually make
a commit or move theHEAD, nor record
$GIT_DIR/MERGE_HEADto cause the next
git commitcommand 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).