Skip to content

Commit 000571b

Browse files
authored
fix: support branch other than master (#9)
Fix #7
1 parent ca48412 commit 000571b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

git-sync.sh

+7
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,11 @@ echo "DESTINATION=$DESTINATION_REPO:$DESTINATION_BRANCH"
3333

3434
git clone "$SOURCE_REPO" source --origin source && cd source
3535
git remote add destination "$DESTINATION_REPO"
36+
37+
# Pull all branches references down locally so subsequent commands can see them
38+
git fetch source '+refs/heads/*:refs/heads/*' --update-head-ok
39+
40+
# Print out all branches
41+
git --no-pager branch -a -vv
42+
3643
git push destination "${SOURCE_BRANCH}:${DESTINATION_BRANCH}" -f

0 commit comments

Comments
 (0)