Skip to content

Instantly share code, notes, and snippets.

@XeeD
Last active February 9, 2018 14:19
Show Gist options
  • Save XeeD/7f685aed757f9e3a7ba1 to your computer and use it in GitHub Desktop.
Save XeeD/7f685aed757f9e3a7ba1 to your computer and use it in GitHub Desktop.
[color]
ui = auto
[core]
editor = vim
autocrlf = false
whitespace = space-before-tab,cr-at-eol
excludesfile = ~/.gitignore_global
trustctime = false
mergeoptions = --no-edit
[alias]
a = add
ai = add --interactive
amend = commit --amend --no-edit
anv = commit --amend --no-edit --no-verify
ap = add --patch
b = branch
bl = branch
c = commit --verbose
clean-local = "!git branch --merged | grep -v \"\\*\" | xargs -n 1 git branch -d"
cnv = commit --verbose --no-verify
co = checkout
fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
gh = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/tree/$(git rev-parse --abbrev-ref HEAD)\""
lg = log --graph --pretty=format:'%Cred%h%Creset %C(yellow)%an%d%Creset %s %Cgreen(%cr)%Creset' --date=relative
ls = branch -l
lsr = branch -rl
m = merge
pb = "!git push -u origin \"$(git rev-parse --abbrev-ref HEAD)\""
pr = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/pull/new/$(git rev-parse --abbrev-ref HEAD)\""
prb = "!open \"$(git remote -v | grep origin | grep push | cut -f 2 | cut -d \" \" -f 1 | sed -e \"s|git@\\(.*\\):\\(.*\\).git|https://\\1/\\2|\")/compare/$(git rev-parse --abbrev-ref HEAD)%0Dmaster\""
rebase-branch = !git rebase -i --autosquash $(git merge-base --fork-point origin/master HEAD)
s = status
sb = status -sb
[pull]
rebase = true
[interactive]
singlekey = true
[merge]
ff = no
[rebase]
autosquash = true
autoStash = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment