Created
January 12, 2024 00:49
-
-
Save fallaciousreasoning/96fc495b1697f6c32f5d126c20fc29ce to your computer and use it in GitHub Desktop.
Generic script for continuing the current git operation
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
#!/usr/bin/env bash | |
repo_path=$(git rev-parse --git-dir) | |
if [ $? -ne 0 ]; then | |
exit $? | |
fi | |
if [ -d "${repo_path}/rebase-merge" ]; then | |
git rebase --continue | |
elif [ -d "${repo_path}/rebase-apply" ]; then | |
git rebase --continue | |
elif [ -f "${repo_path}/MERGE_HEAD" ]; then | |
git merge --continue | |
elif [ -f "${repo_path}/CHERRY_PICK_HEAD" ]; then | |
git cherry-pick --continue | |
elif [ -f "${repo_path}/REVERT_HEAD" ]; then | |
git revert --continue | |
else | |
echo "Nothing in progress?" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment