Skip to content

Instantly share code, notes, and snippets.

@megurock
Last active August 14, 2026 03:12
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 = eiji@fork.co.jp
[core]
autocrlf = input
editor = zed --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"
# いい感じのグラフでログを表示
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
# マージ済みのブランチを削除する
db = !git branch --merged main --format='%(if)%(worktreepath)%(then)%(else)%(refname:short)%(end)' | awk 'NF && $0 != \"main\"' | xargs -r git branch -d
[credential]
useHttpPath = true
helper = osxkeychain
[pull]
rebase = false
[push]
default = current
[init]
defaultBranch = main
[http]
postBuffer = 524288000
[rerere]
enabled = true
[credential "https://git-codecommit.ap-northeast-1.amazonaws.com"]
helper = !aws --profile r7techmapop-stg codecommit credential-helper $@
UseHttpPath = true
[credential "https://github.com"]
helper =
helper = !/opt/homebrew/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/opt/homebrew/bin/gh auth git-credential
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment