Skip to content

Instantly share code, notes, and snippets.

@Mitko-Kerezov
Created October 8, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mitko-Kerezov/ee12f0e08250537905ec to your computer and use it in GitHub Desktop.
Save Mitko-Kerezov/ee12f0e08250537905ec to your computer and use it in GitHub Desktop.
Global git config aliases
[core]
longpaths = true
autocrlf = true
excludesfile = c:/Users/bektchiev/.gitignore_global
editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession -noPlugin
[branch]
autosetuprebase = always
[push]
default = current
[user]
name = Dimitar Kerezov
email = dimitar.kerezov@telerik.com
[credential]
helper = wincred
[alias]
co = checkout
st = status
br = branch
cob = checkout -b
bclean = "!f() { git branch --merged ${1-origin/master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
l = log --pretty=oneline --abbrev-commit
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(cyan)%an%Creset' --abbrev-commit --date=relative
oops = reset --soft HEAD~1
ec = config --global -e
mt = mergetool
pushf = push --force-with-lease
pl = pull --prune
su = submodule update
ps = "!f() { git pl; git su; }; f"
cma = "!f() { git add -A; git commit --all -m \"$1\"; }; f"
cli = "!f() { git co ${1-master} && git ps; }; f"
tool = "!f() { git co ${1-master} && git pull && git submodule sync && git su; }; f"
sub = submodule update --recursive
grunt = "!f() { grunt; }; f"
wipe = "!f() { git reset --hard; git clean -ffdx; }; f"
ca = commit --amend
caa = "!f() { git add --all; git commit --amend --no-edit; }; f"
base = "!f() { git fetch; git rebase ${1-origin/master}; }; f"
delete-tag = "!f() { git fetch; git tag -d $1; git push origin :refs/tags/$1; }; f"
[merge]
tool = tortoisemerge
[mergetool "tortoisemerge"]
cmd = \"D:\\Program Files\\TortoiseGit\\bin\\TortoiseGitMerge.exe\" -base:\"$BASE\" -theirs:\"$REMOTE\" -mine:\"$LOCAL\" -merged:\"$MERGED\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment