Check and set upstream information in git-sync-all
This commit is contained in:
parent
c51926171f
commit
e869e866f1
|
@ -45,6 +45,9 @@ for i in "${!SYNC_DIRS[@]}"; do
|
|||
(
|
||||
cd "$DIRECTORY" || exit
|
||||
git remote set-url origin "$URL"
|
||||
if [ "$(git branch --show-current)" = "main" ]; then
|
||||
git branch --set-upstream-to=origin/main main
|
||||
fi
|
||||
git pull --ff --ff-only
|
||||
git submodule update --remote --recursive
|
||||
git-sync -ns
|
||||
|
|
Reference in a new issue