Imagine I h开发者_JS百科ave a mercurial repo hosted on bitbucket, and I accidentally commited & pushed some binary files. I know I could run convert on the repo, and exclude those files, leaving me with the repo in a better state. Do I need to delete the entire bitbucket repo and create it again, or I could somehow do a force push, and have mercurial deal with it?
If there's an option to strip revisions, you can simply do that. However, in any case, anyone who has pulled from your repository since you committed the files will have to re-clone.
If I run convert
and then try to push the repo, I get an error saying the repositories are unrelated. So, I guess, the repo needs reuploading.
Why not just use the backout
command which reverts the effect of an earlier changeset? See more here. You can backout the changeset in question which will force a merge of later changesets, thus removing what you no longer want. It will still be part of history, though.
精彩评论