dotfiles/bin/git_set_upstream

13 lines
263 B
Plaintext
Raw Normal View History

2020-11-23 04:33:00 +00:00
#!/bin/bash
# Copied from David Pedersen: https://github.com/davidpdrsn/dotfiles/blob/master/bin/git-pp
set -e
function git_branch_name {
val=`git branch 2>/dev/null | grep '^*' | colrm 1 2`
echo "$val"
}
git push --set-upstream origin $(git_branch_name)