]> git.phdru.name Git - git-scripts.git/blobdiff - update-remotes
Feat(submodules/remove): Add option `-c`
[git-scripts.git] / update-remotes
index 6fabc29a60439b086d47c6fbbb0b17e8e1c7e5db..dca6f3fe383b184490b838137fe4d623ca60f7ce 100755 (executable)
@@ -2,6 +2,7 @@
 
 current="`git config --get --path remote.current.url`"
 origin="`git config --get --path remote.origin.url`"
+branches="master ${1:+$@}"
 
 if [ -n "$origin" ]; then
    if [ -n "$current" ]; then
@@ -18,10 +19,13 @@ fi
 
 git fetch current &&
 { git pull --ff-only current master || git reset --hard current/master ; } &&
+git set-date &&
 
 web="`git config --get --path remote.web.url`" &&
 if [ -n "$web" ]; then
-   git push web
+   git push --force web $branches
 fi &&
 
-cd "$current" && exec git pull origin
+cd "$current" &&
+git pull origin &&
+exec git set-date