Skip to content

Instantly share code, notes, and snippets.

@wuelcas
Last active November 3, 2017 20:21
Show Gist options
  • Save wuelcas/59f5072560b47e2830db4c004220b387 to your computer and use it in GitHub Desktop.
Save wuelcas/59f5072560b47e2830db4c004220b387 to your computer and use it in GitHub Desktop.
To list all the files in a commit:
git diff-tree --no-commit-id --name-only -r <commit-sha>
To edit/undo last commit
git commit -m "Something terribly misguided"
git reset HEAD~
<< edit files as necessary >>
git add ...
git commit -C ORIG_HEAD // keep same commit message
git commit -c ORIG_HEAD // edit commit message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment