Skip to content

Instantly share code, notes, and snippets.

@YuanLiou
Last active July 4, 2024 08:36
Show Gist options
  • Select an option

  • Save YuanLiou/b40d0082ab716176f8c1145d19c5fcca to your computer and use it in GitHub Desktop.

Select an option

Save YuanLiou/b40d0082ab716176f8c1145d19c5fcca to your computer and use it in GitHub Desktop.
Ray's Git Config 2.0
[user]
name = Ray-Yuan Liu
email = [email protected]
[color]
diff = auto
status = auto
branch = auto
log = auto
[alias]
st = status
co = checkout
cm = commit
br = branch
df = diff
lp = log -p
lg = log --oneline --graph
lg2 = log --graph --pretty=format:'%Cred%h%Creset %an -%C(yellow)%d%Creset %s %Cgreen(%cr)'
lg3 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
ca = commit --amend
dsf = "!f() { [ -z \"$GIT_PREFIX\" ] || cd \"$GIT_PREFIX\" && git diff --color \"$@\" | diff-so-fancy | less --tabs=4 -RFX; }; f"
cb = checkout -b
pushf = push --force-with-lease
cp = cherry-pick
ru = remote update -p
wt = worktree
rtag = ls-remote --tags origin
po = push origin HEAD
fpo = push --force-with-lease origin HEAD
pm = "push origin HEAD -o merge_request.create -o merge_request.target=master -o merge_request.remove_source_branch"
rmbr = fetch --prune
dc = diff --cached
sc = switch -c
aan = commit -a --amend --no-edit
show-containing-tag = "!f() { git describe --contains \"$1\" | sed -E 's/[~^][0-9]*//g' ; }; f"
[core]
excludesfile = /Users/louis383/.gitignore_global
editor = nvim
[branch]
autosetuprebase = always
[http]
sslVerify = true
[rerere]
enabled = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment