Last active
September 26, 2020 16:13
-
-
Save blinkinglight/e60e6ab64a61f7fd4fa7f97aa99d5398 to your computer and use it in GitHub Desktop.
git fetch branch and reset its contents
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
worker.bash /var/www/html/project1 devel |
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 | |
while true; do | |
cd $1 | |
git fetch origin $2 | |
git reset --hard FETCH_HEAD | |
sleep 10; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment