Skip to content

Instantly share code, notes, and snippets.

@kingbin
Last active January 2, 2016 21:19
Show Gist options
  • Save kingbin/8363055 to your computer and use it in GitHub Desktop.
Save kingbin/8363055 to your computer and use it in GitHub Desktop.
git commit detective work between 2 hashesResult will have
git checkout <hash A>
git diff –patch <hash A> <hash B> > patch.patch
patch –p1 –N < patch.patch
// Remove any rej files generated from patch
for i in $(git status | awk '/**.rej/{print $2}'); do rm $i; done
// Pull copy from one branch into local copy
git show experiment:path/to/app.js > app.js
// Push as another user
git push https://[email protected]/bar/ish.git nonce:nonce
// List files changed in a commit
git diff-tree --no-commit-id --name-only -r bd61ad98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment