Created
May 20, 2024 08:47
-
-
Save RichardBray/f4d4e3c82784f14dc68da19400ecd5ad to your computer and use it in GitHub Desktop.
Revisions
-
RichardBray created this gist
May 20, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/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