Last active
August 29, 2015 13:58
-
-
Save ankyhe/9988642 to your computer and use it in GitHub Desktop.
git tips
This file contains 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
-- Diffmerge as Diff in OSX -- | |
1. Download diffmerge (https://sourcegear.com/diffmerge/), I suggest donwload dmg file | |
2. Copy diffmerge/extra/diffmerge into /usr/local/bin | |
3. sudo vim /usr/local/bin/dmdiff, which content is as below: | |
#!/bin/sh | |
/usr/local/bin/diffmerge "$2" "$5" >& /dev/null | |
4. vim ~/.gitconfig: | |
[diff] | |
external = dmdiff | |
tool = diffmerge | |
[difftool] | |
prompt = false | |
[difftool "diffmerge"] | |
cmd = diffmerge $LOCAL $REMOTE >& /dev/null | |
-- Show all diff in one time -- | |
1. git clone https://github.com/ankyhe/git-diffall.git | |
2. copy git-diffall into $(git --exec-path) | |
3. you could use git diffall | |
examples: | |
git diffall HEAD^1..HEAD | |
git diffall --staged | |
Q&A: | |
Because diffall need folder diff functionality, so please make sure your diff tool supports it. (p4merge doesn't support folder diff). I suggest use Diffmerge in OSX (or Beyond Compare) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment