Last active
December 16, 2021 00:41
-
-
Save renkin/900d436731224d8c50be89f0d875121e to your computer and use it in GitHub Desktop.
Update current branch from branch "develop"
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/bash | |
MAIN_BRANCH=${1:-develop} | |
echo | |
echo "Fetching..." | |
git fe | |
echo | |
echo "Switching to $MAIN_BRANCH..." | |
git co $MAIN_BRANCH | |
echo | |
echo "Pulling $MAIN_BRANCH..." | |
git pull | |
echo | |
echo "Switching back..." | |
git co - | |
echo | |
echo "Merging $MAIN_BRANCH..." | |
git merge $MAIN_BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use in the script the aliases. These aliases are defined in another gist.