Created
May 20, 2024 08:47
-
-
Save RichardBray/f4d4e3c82784f14dc68da19400ecd5ad to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# This script is a W.I.P | |
# To use it, just save the file and run sh git-pull.sh | |
git fetch | |
git diff HEAD..FETCH_HEAD | |
read -p "Do you want to merge? (Y/n) " answer | |
if [[ -z "$answer" ]]; then | |
answer="y" | |
fi | |
case ${answer:0:1} in | |
y|Y ) | |
git merge FETCH_HEAD | |
echo "Thank you for merging." | |
;; | |
* ) | |
echo "Exiting without merging." | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment