Skip to content

Instantly share code, notes, and snippets.

@false-git
Last active August 5, 2019 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save false-git/cf325932be185069bf12995fb95f44b6 to your computer and use it in GitHub Desktop.
Save false-git/cf325932be185069bf12995fb95f44b6 to your computer and use it in GitHub Desktop.
git config
[alias]
st = status -sb
[push]
default = simple
[core]
quotepath = false
[pager]
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less
[interactive]
diffFilter = 'diff-highlight'
[diff]
compactionHeuristic = true
@false-git
Copy link
Author

false-git commented Aug 5, 2019

  • status -sb : short表示、かつshort表示でブランチ名を表示する。
  • push.default = simple : push時に、upstreamが設定されていて、ローカルと同名のブランチであるときのみpushする。
  • quotepath = true : git log等で日本語ファイル名をquoteしない。
  • pager : diff-highlightを使う。
  • diff.compactionHeuristic = true : diff-hightlightを良い感じにする。

diff-hightlightは、PATHが通っていない場合、/usr/local/share/git-core/contribにあるので、PATHを通す、フルパスで書く、リンクを貼る等で対応する。(あるいは、/usr/local/src/git/contrib/diff-highlight 等でビルドする必要があるかも知れない。バージョンによるとのこと)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment