Skip to content

Instantly share code, notes, and snippets.

@ShabbyX
Last active April 10, 2024 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ShabbyX/3946480 to your computer and use it in GitHub Desktop.
Save ShabbyX/3946480 to your computer and use it in GitHub Desktop.
My .gitconfig
[user]
name = XXX XXX
email = XXX@XXX.XXX
signingkey = XXXXXXX
[color]
ui = auto
status = auto
[alias]
s = status
co = checkout
ls = ls-files
c = commit -s -S
l = log --format='%C(auto)%h {%<(16,trunc)%an} %d %<|(120,trunc)%s [%ar]' --graph --decorate
la = log --format='%C(auto)%h {%<(16,trunc)%an} %d %<|(120,trunc)%s [%ar]' --graph --decorate --all
d = diff
dc = diff --cached
dw = diff --color-words
dcw = diff --cached --color-words
ri = rebase -i
rc = rebase --continue
r1 = "!f() { git rebase --onto \"$1\" HEAD~1 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
r2 = "!f() { git rebase --onto \"$1\" HEAD~2 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
r3 = "!f() { git rebase --onto \"$1\" HEAD~3 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
r4 = "!f() { git rebase --onto \"$1\" HEAD~4 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
r5 = "!f() { git rebase --onto \"$1\" HEAD~5 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
r6 = "!f() { git rebase --onto \"$1\" HEAD~6 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
r7 = "!f() { git rebase --onto \"$1\" HEAD~7 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
r8 = "!f() { git rebase --onto \"$1\" HEAD~8 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
r9 = "!f() { git rebase --onto \"$1\" HEAD~9 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
r10 = "!f() { git rebase --onto \"$1\" HEAD~10 \"$(git rev-parse --abbrev-ref HEAD)\"; }; f"
review = "!f() { sensible-browser $(git show \"$1\" | grep Reviewed-on | cut -d' ' -f6); }; f"
push-f = push --force-with-lease
[core]
autocrlf = false
filemode = false
untrackedCache = true
[merge]
conflictstyle = diff3
[push]
default = upstream
autoSetupRemote = true
[diff]
wordRegex = [[:alnum:]_]+|[^[:space:]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment