Created
May 10, 2018 15:36
-
-
Save a2ikm/c8b5ec20710f37ae8955e6fe3d884566 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
remote="origin" | |
if git remote | grep fork >/dev/null 2>&1; then | |
remote="fork" | |
fi | |
branch="$(git rev-parse --abbrev-ref HEAD)" | |
git push -u $remote $branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment