简体   繁体   中英

svn: How to revert somebody else's commit?

Argh, somebody (OK, my boss) added and commited all the files in his directory, meaning all the svn files: conf/, db/, format, hooks/, locks/... I'm using Tortoise, so I tried clicking on each one and doing revert, it said OK, but I still see all of them under version control after update/commit.

We are now several versions past that. How do I clean things up ? Thanks

In Subversion, "revert" means to undo uncommitted changes to a working copy. What you're looking to do is to (effectively) undo a commit. This is normally done in Subversion with a reverse merge

Assuming that your boss did everything in a single commit (revision REVNUM), you'll just do the following in your working copy:

svn merge -c -REVNUM URL_TO_REPOSITORY_LOCATION

Then commit the new revision. All changes made in REVNUM will no longer be visible in the HEAD revision, and your revision history will show the changes committed, then merged back out.

Use the TortoiseSVN Merge context menu item to step through the same process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM