-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
34 lines (28 loc) · 1.48 KB
/
.gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[color]
ui = true
[branch]
autosetuprebase = remote
[core]
editor = vi
autocrlf = input
[alias]
ca = commit --amend --no-edit # silently amend
ci = commit -v # verbose commit (opens $EDITOR)
co = checkout
cor = "!f() { git fetch --all && git checkout -b $1 origin/$1; }; f" # checkout from origin
fa = fetch --all
lb = branch -l -a # list branches
rb = "!f() { git rebase -i HEAD~$1; }; f" # rebase last n commits interactively
sp = diff @{1}.. # show changes introduced by last pull (only works if there actually were changes)
ss = diff --cached # show staged changes
st = status
us = rm -r --cached # unstage specific file/folder; use "." to unstage everything
lli = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) | %C(bold cyan)%ad%C(reset) | %C(white)%s%C(reset) %C(dim white)| %an%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)' --all --date=format:'%Y-%m-%d, %H:%M' # log like IntelliJ
delete-all-tags = !"git tag -l | xargs -n 1 git push --delete origin && git tag | xargs git tag -d"
standup = "!f(){ git log --since \"$1\" --author \"$2\" --all; };f"
rename-master2main = "!f(){ git branch -m master main && git fetch origin && git branch -u origin/main main && git remote set-head origin -a && git remote prune origin; };f"
aliases = "!f(){ git config --get-regexp '^alias\\.'; };f"
[include]
path = .gitconfig.local
[init]
defaultBranch = main