[core] autocrlf = true excludesfile = C:\\Users\\Brett\\Documents\\gitignore_global.txt # Git Extensions built-in commit editor #editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor # Use Visual Studio Code editor = code -w longpaths = true [init] templatedir = ~/.git_template [user] name = Brett Taylor email = brett@webfroot.co.nz signingKey = "" [push] default = simple [branch] autosetuprebase = always [color] ui = true [alias] ec = config --global --edit # Edit global git Config la = !git config -l | grep alias | cut -c 7- # List Aliases l = log --pretty=format:%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn] --decorate --date=short lg = log --oneline --decorate --all --graph # Log Graph lt = log --graph --decorate --pretty=format:'%C(yellow)%h%Creset%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset' b = branch a = add ap = add -p # Add Parts s = status -s st = status -s c = commit --verbose up = push -u origin HEAD # "get up, get on up" pushit = push -u origin HEAD --force-with-lease # "push it real good!" # Many of these are from: https://haacked.com/archive/2014/07/28/github-flow-aliases/ co = checkout cob = checkout -b # CheckOut Branch cm = !git add -A && git commit --verbose # Commit all with Message save = !git add -A && git commit -m 'SAVEPOINT' # include all untracked files wip = !git add -u && git commit -m 'WIP' # include only tracked files undo = reset HEAD~1 --mixed # your last commit, undone and ready to redo amend = commit -a --amend # amend the last commit, including tracked file modifications wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard # safer `git reset HEAD --hard` optimize = "!git optimise" optimise = "!git remote prune origin && git bclean && git prune && git deep-repack" deep-repack = !git repack -a -d --depth=250 --window=250 bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f" # delete merged branches bdone = "!f() { git checkout ${1-master} && git upd && git bclean ${1-master}; }; f" # "branch done!" go to master, pull, and delete merged branches upd = !git pull --rebase --prune $@ && git submodule update --init --recursive # https://haacked.com/archive/2015/06/29/git-migrate/ # migrate {new-branch} [target-branch] [commit-range]: move commits on current branch to new branch name. migrate = "!f(){ CURRENT=$(git symbolic-ref --short HEAD); git checkout -b $1 && git branch --force $CURRENT ${3-'$CURRENT@{u}'} && git rebase --onto ${2-master} $CURRENT; }; f" # use Paul Irish's git-open: https://github.com/paulirish/git-open browse = !git open gh = !git open [merge] # this is the tool that will be used when using `git mergetool` tool = bc3 [diff] # this is the tool that will be used when using `git difftool` tool = bc3 guitool = bc3 [mergetool "bc3"] trustExitCode = true [filter "lfs"] clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true [gpg] program = gpg [commit] gpgSign = false [tag] forceSignAnnotated = false [credential "helperselector"] selected = wincred