Accidentally committed a large amount of raw data in Mercurial, how do I keep it from overloading my bitbucket repository?

前端 未结 3 1653
南笙
南笙 2021-01-12 09:54

I copied a large amount of data from my labs file server to my laptop, then accidentally committed it to the Mercurial repository I\'m using to back up my thesis.

N

3条回答
  •  被撕碎了的回忆
    2021-01-12 10:42

    You can:

    1. Use hg strip to remove the changeset where you've added the files and all of its descendants (note that this will obliterate them completely, so only do it if these files are the only thing committed during this time).
    2. Import those changesets to MQ and edit them.
    3. Use hg convert from Mercurial to Mercurial with --filemap option.
    4. Clone your repository up to faulty changeset and push from this one instead, as described in FAQ.

提交回复
热议问题