Last active
August 7, 2017 16:04
-
-
Save kuckmc01/9d3ca47cb0f3c871c93027673d1656a2 to your computer and use it in GitHub Desktop.
Push git current branch without typing branch name.
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
#!/usr/bin/env bash | |
# Add to .bash_profile: alias pushit='. /locationtofile/pushit.sh' | |
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | |
echo "pushing to branch $CURRENT_BRANCH" | |
git push origin $CURRENT_BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment