Skip to content
magnum edited this page Oct 26, 2015 · 9 revisions

Commit all but your latest commit (assuming upstream remote is called origin and your branch is bleeding-jumbo):

$ git push origin HEAD^:bleeding-jumbo

Obviously, using HEAD~2 instead of HEAD^ will commit all but your two latest, and so on.


To avoid local merges (see http://aaronbonner.io/post/78444674979/only-allow-git-fast-forward-merges-to-avoid-ugly and this discussion):

$ git config --global merge.ff only

You can show any commit with (most) WS changes muted, using eg.

git show -w e137572