Last active
December 17, 2015 00:19
-
-
Save bahostetterlewis/5519901 to your computer and use it in GitHub Desktop.
useful git shit
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 config --global alias.ignorechanges = update-index --assume-unchanged | |
| git config --global alias.noticechanges = update-index --no-assume-unchanged |
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 log --pretty=oneline | |
| git log --graph --pretty=oneline | |
| git diff <branch1> <branch2> --word-diff | |
| git checkout --theirs -- <file> # key here is the -- says end of params | |
| git checkout --ours -- <file> # This solves simple conflicts | |
| git pull <remote> +branch:mybranch #overwrite my changes with those on the remove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment