@@ -312,7 +312,7 @@ Note: first open Chrome for the first time
312312- Use built-in keychain and app password from above, and add a Mac specific global gitignore:
313313 ``` bash
314314 git config --global user.name " ddelange"
315- git config --global user.email " 14880945+ ddelange@users.noreply.github.com" # https://github.com/settings/emails
315+ git config --global user.email " ddelange@users.noreply.github.com"
316316 git config --global credential.helper osxkeychain
317317
318318 # EITHER
@@ -331,6 +331,7 @@ Note: first open Chrome for the first time
331331 gpg --armor --export < key-here> # paste this key at github.com/settings/keys
332332 git config --global user.signingkey < key-here>
333333 git config --global commit.gpgsign true
334+ git config --global gpg.program " $( which gpg) "
334335 # sign tags using git tag -s
335336 ```
336337- To [ enable password caching] ( https://stackoverflow.com/a/38422272/5511061 ) for 1 week:
@@ -368,7 +369,7 @@ git config --global alias.co "checkout"
368369git config --global alias.mt " mergetool"
369370git config --global alias.st " status"
370371# split diff - needs icdiff (see below) - use `git icdiff` to keep output in terminal after less quits
371- git config --global alias.df ' ! f() { diff=$(git icdiff --color=always "$@") && test "$diff" && echo "$diff" | less -eR; }; f'
372+ git config --global alias.df ' ! f() { diff=$(git difft "$@") && test "$diff" && echo "$diff" | less -eR; }; f'
372373# who needs the default verbose git log? - also try `git lg --all`
373374git config --global alias.lg " log --graph --oneline"
374375# tested with GitHub remote - ref https://stackoverflow.com/questions/28666357#comment101797372_50056710
@@ -416,13 +417,20 @@ git config --global alias.undo '! f() { git reset --hard $(git rev-parse --abbre
416417##### Split diff
417418
418419- ` git df ` (above) uses less that keeps a clean terminal
419- - ` git icdiff ` (below) uses new core.pager that leaves less output in terminal after exiting
420+ - ` git icdiff ` and ` git difft ` (below) uses new core.pager that leaves less output in terminal after exiting
420421
421422``` bash
422- pip install git+https://github.com/jeffkaufman/icdiff.git
423423git config --global --replace-all core.pager ' less -+$LESS -eFRSX' # with double quotes, $ will be evaluated
424- git config --global icdiff.options " --highlight --line-numbers --numlines=3"
425- git config --global difftool.icdiff.cmd ' icdiff --highlight --line-numbers --numlines=3 $LOCAL $REMOTE'
424+
425+ # with diff highlighting
426+ pip install git+https://github.com/jeffkaufman/icdiff.git # installs git-icdiff for `git icdiff``
427+ git config --global icdiff.options " --highlight --line-numbers --numlines=3 --color=always"
428+ git config --global difftool.icdiff.cmd ' icdiff --highlight --line-numbers --numlines=3 --color=always $LOCAL $REMOTE'
429+
430+ # with syntax & diff highlighting
431+ brew install difftastic
432+ git config --global difftool.difft.cmd ' difft --display=side-by-side-show-both --color=always --background=light "$LOCAL" "$REMOTE"'
433+ git config --global alias.difft ' difftool --tool difft --no-prompt'
426434```
427435
428436
0 commit comments