git-sync-mirror
git-sync-mirror copied to clipboard
Sync fails (when rebasing and force pushing branch)
Hi guys!
Its not really an issue, its the correct behaviour of git, but it prevents a sync. When you push a new branch and later you rebase it and make a force push to your "SOURCE_REPO", than the sync must be also make a force push, otherwise the push will be rejected.
So it would be great if there are an option to force push instead of plain push in the sync() method. So user can decide if he needs force push or not.
Hey :wave: . This change makes sense. I see this implemented like this:
git push \
--all \
$([ "${DO_FORCE_PUSH}" = true ] && echo "--force") \
"${dst_repo}" \
|| [ "${TWO_WAY}" = true ]
Or similar. Can you file a pull request for that?
Hey, did it :)
Hey again, maybe it would be good to update also the official docker hub image.
Thanks :)
done. thx for reminding me.