开发者

Subversion merge a commit with a previous commit

开发者 https://www.devze.com 2023-01-31 23:32 出处:网络
Is it possible in subversion to let a commit be part of a previous commit. Say you forgot to commit a c开发者_Python百科ertain file, can you commit this file like you would have committed it in the pr

Is it possible in subversion to let a commit be part of a previous commit. Say you forgot to commit a c开发者_Python百科ertain file, can you commit this file like you would have committed it in the previous commit?


I'm afraid you cannot. Other version control systems allow to do so, but not Subversion.

Your only chance would be to dump the complete repository, remove the last commit from the dump, restore the dump and start again... but I would not even consider the idea.


If you have access to the server/repository location, you can remove your initial commit.

After that, you can do your commit again, but adding the new file first. If this is a multi-person team, you'll need to get anyone who's updated to the new revision to "update" to an old one and then update again.

This is unrelated, but a project I'm on has a 'pre-commit-check' script we run before committing. Among other things, it catches when we forget to add files.


  1. Dump the repository.
  2. Change the dump.
  3. Move the repository out of the way.
  4. Create a new repository.
  5. Load the dump into the repository.
0

精彩评论

暂无评论...
验证码 换一张
取 消