Our Project is using CVS
and its is integrated from eclipse
and so we use Team Synchronizing
to get the latest code from CV开发者_JAVA百科S but is there a way to revert the previous commit or update from repositry which we have done ?
I come from git
background and so I am having hard time to find out this functionality from eclipse/cvs
, any suggestion would be highly apprecaited.
It depends what you mean by "revert".
The git revert
actually add a new commit canceling the changes introduced by the previous one.
With Eclipse, that would be (file by file): "Replace With -> History
"
(see "How to properly roll back to an older version in CVS HEAD using Eclipse?")
And then make a new commit.
In other word, there don't seem to be any simple way to do this (when many files are impacted)...
Right click on the file -> Team -> Revert to Base. This will overwrite any local changes and revert to the most up-to-date version of the file in CVS.
Any this what you're after? (I have to admit that I find the question somewhat unclear)
If you mean it in the sense of uncommitting something you committed before, erasing it from the history of the file, then no, you cannot do that.
You can only get the previous version back from the repository and commit that again, making it clear in the comment that you reverted the file to a previous revision.
精彩评论