Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync fails (when rebasing and force pushing branch) #17

Open
stefan1242 opened this issue Mar 9, 2022 · 4 comments
Open

Sync fails (when rebasing and force pushing branch) #17

stefan1242 opened this issue Mar 9, 2022 · 4 comments

Comments

@stefan1242
Copy link
Contributor

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.

@stefan1242 stefan1242 changed the title Sync fails (when rebasing branch) Sync fails (when rebasing and force pushing branch) Mar 9, 2022
@Enteee
Copy link
Owner

Enteee commented Mar 11, 2022

Hey 👋 . 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?

@stefan1242
Copy link
Contributor Author

Hey, did it :)

@stefan1242
Copy link
Contributor Author

Hey again, maybe it would be good to update also the official docker hub image.

Thanks :)

@Enteee
Copy link
Owner

Enteee commented Jul 25, 2022

done. thx for reminding me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants