Created
November 27, 2024 16:13
-
-
Save willywongi/52a71f70c1e39879fbc0a2eadf5b5a4c to your computer and use it in GitHub Desktop.
Fork (Git client) custom command
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
is_stash_needed=$(git status -s) | |
if [ -n "$is_stash_needed" ] | |
then | |
git stash push | |
fi | |
git checkout $1{ref} | |
git merge ${ref} | |
git push origin refs/heads/$1{ref} | |
git checkout ${ref} | |
if [ -n "$is_stash_needed" ] | |
then | |
git stash pop | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment