Created
August 2, 2019 05:00
-
-
Save nik-john/4ffc1995da1bfcb0ff1177bdb022f9d0 to your computer and use it in GitHub Desktop.
Quickly Switch Git Branches for Code Review
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
review() { | |
# read -p "Are you sure you want to git stash && git fetch && git checkout $1? (y/n)" -n 1 -r | |
# echo | |
# if [[ $REPLY =~ ^[Yy]$ ]] | |
# then | |
git add . && git stash && git fetch && git checkout "$1" | |
# fi | |
} | |
unreview() { | |
# read -p "Are you sure you want to git checkout $1 && git stash pop? (y/n)" -n 1 -r | |
# echo | |
# if [[ $REPLY =~ ^[Yy]$ ]] | |
# then | |
git checkout "$1" && git stash pop | |
# fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment