Last active
January 15, 2018 05:44
-
-
Save nbkhope/cd82ea480d9fc46e8f25e6a3b09d39d8 to your computer and use it in GitHub Desktop.
Push the current branch to origin with the `gp` command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gp() { | |
if [ -d ".git" ] | |
then | |
BRANCH_NAME="$(git branch | grep '*' | cut -d' ' -f2)" | |
git push origin "$BRANCH_NAME" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment