Skip to content

Instantly share code, notes, and snippets.

@megurock
Last active December 30, 2025 01:22
Show Gist options
  • Select an option

  • Save megurock/dbefc28d58d8c5dab41194f374dd91b7 to your computer and use it in GitHub Desktop.

Select an option

Save megurock/dbefc28d58d8c5dab41194f374dd91b7 to your computer and use it in GitHub Desktop.
.gitconfig
[user]
name = Eiji Meguro
email = [email protected]
[core]
autocrlf = input
editor = code --wait
[alias]
br = branch
st = status
cm = commit -m
pl = pull --prune
ps = push -u origin
fps = push --force-with-lease
co = checkout
sw = switch
cp = cherry-pick
rb = rebase
lg = "!f() { git log --oneline --graph --decorate --max-count=${1:-20}; }; f"
sh = "!f() { git show --no-patch HEAD~${1:-0}; }; f"
pl = pull --prune
# いい感じのグラフでログを表示
gr = log --graph --date=short --decorate=short --pretty=format:'%Cgreen%h %Creset%cd %Cblue%cn %Cred%d %Creset%s'
# 単語レベルでの差分を色付きで表示する
dw = diff --word-diff
# 変更のあったファイルとそのファイルの修正ライン数を表示する
df = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
# 2 つのコミット間で変更のあったファイルを表示する
# 例) git dff <commit1> <commit2>
dff = "!f() { git diff --name-only \"$@\"; }; f"
# ローカルとリモートのブランチを同期する
refresh= !git fetch origin && git remote prune origin
[credential]
helper = osxkeychain
[pull]
rebase = false
[push]
default = current
[init]
defaultBranch = main
[http]
postBuffer = 524288000
[rerere]
enabled = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment