Custom gitconfig .gitconfig - mmaarrttyy/settings-configs GitHub Wiki

This is Git’s per-user configuration file.

name = Martin Kadlec
email = [email protected]
autocrlf = false
ui = auto
alias = "!f(){ git config -l | grep alias; };f"
st = status --short --branch
ci = commit
cl = "!f() { echo 'Remove following files?'; echo; git clean -dn; echo; echo 'Press ENTER to confirm'; read -p 'Press ^C to stop cleanup and exit' a && git clean -df; }; f"
co = checkout
cp = cherry-pick
br = branch
bra = branch -avv
dc = diff --cached
di = diff
sp = "stash show stash@{0} -p"
ss = "!f(){ git stash show -p stash@{${1}}; };f"
sl = stash list
sr = "!f(){ rev=$(git rev-parse ${1}) && git stash drop ${1} || exit 1; git diff-index --quiet HEAD; s=$?; [ $s != 0 ] && git stash save 'tmp stash from stash-rename'; git stash apply $rev && shift && git stash save '$@' && [ $s != 0 ] && git stash pop stash@{1}; };f" #stash rename
fa = fetch --all
fe = fetch
fp = fetch -p
ff = "!f(){ B=$(git rev-parse --abbrev-ref HEAD) && git merge --ff-only origin/$B; };f"
ls = log --pretty=format:'%C(green)%h%Creset - %s%C(yellow)%d%Creset%n          %aD (%ar %C(red)- %an%Creset)' --graph --color
ll = log --pretty=format:'%C(green)%h%Creset - %s%C(yellow)%d%Creset%n          %aD (%ar %C(red)- %an%Creset)' --graph --color --all
wc = whatchanged -p --pretty=format:'%C(red)%h %Creset%s%n%C(yellow)%an <%ae> %C(green)(%ar)%Creset'
bl = blame
uiu = update-index --assume-unchanged # untrack file
uit = update-index --no-assume-unchanged # track file
ctags = "!f(){ ./.git/hooks/ctags; };f"
unstash = stash pop
rmbranch = "!f(){ git branch -d ${1} && git push origin --delete ${1}; };f"
mkbranch = "!f(){ git checkout -b ${1} && git push origin -u ${1}; };f"
unfuck = "!f(){ git reset --hard origin/HEAD; rm -fv `git st | grep ^? | cut -d' '  -f2-`; };f"
⚠️ **GitHub.com Fallback** ⚠️