Add some new git convenience

This commit is contained in:
Max Bucknell 2020-03-04 15:21:48 +11:00
parent 7b64bbdbf5
commit ad301d475d
2 changed files with 16 additions and 1 deletions

8
bin/max-set-upstream Executable file
View file

@ -0,0 +1,8 @@
#! /usr/bin/env bash
function main {
local branch="$(git rev-parse --abbrev-ref HEAD)"
git branch --set-upstream-to="origin/$branch" "$branch"
}
main $1

View file

@ -9,7 +9,7 @@
email = me@maxbucknell.com
[alias]
dc = diff --cached
dc = diff --staged
di = diff
amend = commit --amend
aa = add --all
@ -23,7 +23,9 @@
current-branch = rev-parse --abbrev-ref HEAD
cl = clone
ll = !max-git-log
uu = !max-set-upstream
whodunnit = blame
peek = log -1
[color]
ui = auto
@ -38,3 +40,8 @@
user = maxbucknell
[credential]
helper = osxkeychain
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true