-
-
Save likema/45cd17b964bbc2e92e80ef7de92dc60f to your computer and use it in GitHub Desktop.
Push current git branch to origin
This file contains hidden or 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
| #!/bin/sh | |
| current_branch=`git rev-parse --abbrev-ref HEAD` | |
| if [ -z "current_branch" ]; then | |
| echo "You are not in a git repository." >&2 | |
| exit 1 | |
| fi | |
| git push ${1:--u} origin $current_branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Push the current branch to origin.
Push the current branch to origin forcely.