dotfiles/bin/git_set_upstream
2021-04-22 09:46:59 -04:00

13 lines
260 B
Bash
Executable File

#!/bin/sh
# Copied from David Pedersen: https://github.com/davidpdrsn/dotfiles/blob/master/bin/git-pp
set -e
git_branch_name() {
val=$( git branch 2>/dev/null | grep '^\*' | colrm 1 2 )
echo "$val"
}
git push --set-upstream origin "$(git_branch_name)"