Last active
January 2, 2016 21:19
-
-
Save kingbin/8363055 to your computer and use it in GitHub Desktop.
git commit detective work between 2 hashesResult will have
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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