Can I delete a commit in Subversion?

后端 未结 4 1770
忘了有多久
忘了有多久 2021-01-04 06:33

Per accident I committed twice because I forgot to add two files. Can I remove a specific commit from the log?

\

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-04 07:15

    1. AFAICS, you have not delete r4, but merge with r5, yes?
    2. In general, SVN commit history is immutable, as Sii said - and if you haven't rights delete/create repo - you can't do anything.

    If you can delete current repo and create new with new history, you can try:

    • svnadmin dump for getting human-readable (barely, I have to say) repository-dump, grok format and edit dump, delete repo, svnadmin load to recreate the repo
    • another idea is (instead of editing dump) another SCM, which has a bridge to SVN (hg+MQ (histedit)+hg-git, f.e, will allow you to get repo and fold/delete changesets). For replacing old repository - see p.2 above

提交回复
热议问题