-
Notifications
You must be signed in to change notification settings - Fork 2
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
Option to enable/disable force push (LMBQ-59) #1
Comments
Interesting idea. Hg push actually already happens in a forced manner, since this is needed to be able to push multiple heads of a single branch with different bookmarks (which is required to sync git repos to hg repos, since git branches will be translated to bookmarks on the default branch). Doing force push in git would need to change the refspecs in Probably what we could to is have an option to do force push in either direction, no matter the destination repository's type (so like having checkboxes for both repos). By default this would be on if the destination repo is hg and off if git. We could have this no matter if the sync is one-way or two-way. We'll think about this but first we need to do some major refactoring, related to reflecting on the UI that actually git-git, git-hg and hg-hg sync, both bidirectionally and just one-way are supported. |
@xoviat a force push would potentially overwrite new commits in the destination repo and cause data loss. Are you sure this is a good idea? BTW now the option is to fix the destination repo by hand, see https://githgmirror.com/faq ("I've rewritten history and I'm getting punished for it. What now?"). |
Since we have the "Git ref selection regex for pushes" config now, this is less interesting. You can configure it to just push branches where you don't rewrite history or do other things requiring a force push. |
For whatever reason, sometimes repository histories diverge and then become unsyncable. In this case, there should be the option to force the git repository to update, if desired. I don't think this is easily done for the mercurial repository, so it probably should be restricted to git.
The text was updated successfully, but these errors were encountered: