summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-07-23 16:49:54 +0800
committerXiao Pan <xyz@flylightning.xyz>2025-07-23 16:49:54 +0800
commiteefd237b94187071dedbd4928da985f2916684d7 (patch)
tree0a2129643fddf3be02716795b07cda4b59d2a26d
parentbade87d53fae651f9e5bf58a65f170ed3f3fb6bd (diff)
upd git checkout to master before restore-mtime
-rwxr-xr-xsh/upd4
1 files changed, 4 insertions, 0 deletions
diff --git a/sh/upd b/sh/upd
index 32a668e..cc9dd46 100755
--- a/sh/upd
+++ b/sh/upd
@@ -43,6 +43,10 @@ backup () {
*) git push;;
esac
done
+ # always go back to a specific branch, because future new branshes may
+ # make previous git checkout checkout to that new branch cause rsync
+ # have to sync that new branch instead
+ git checkout master
# git checkout will change mtime, need to change back so rsync won't think it needs to backup these files
# https://stackoverflow.com/q/1964470/9008720
# https://stackoverflow.com/q/21735435/9008720