Last active
October 12, 2019 17:22
-
-
Save jschwarty/c7b7af208c55ff657c31fe74a0fb5021 to your computer and use it in GitHub Desktop.
Custom functions for oh-my-zsh terminal to work with common git stuff
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
# Sync master with remote upstream (and re-checkout previous branch) | |
function gitsum { | |
currentBranch=$(git symbolic-ref -q --short HEAD) | |
git fetch upstream | |
git checkout master | |
git merge upstream/master | |
git push | |
git checkout $currentBranch | |
} | |
# Add remote upstream | |
function grup { | |
git remote add upstream $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment