Skip to content
magnum edited this page Aug 16, 2017 · 8 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

Compare a file (for any branch) against core JtR (master branch)

git diff origin/master origin/multisalt-resume src/recovery.c

Show any file from any branch without moving away from your current tree or touching anything

git show master:src/john.c

Note that the src/ is needed even if your CWD is just that.