简体   繁体   English

使用git svn回滚svn服务器上的一些更改?

[英]Use git svn to roll back some changes on the svn server?

If I use git svn dcommit to commit a change, and then make a few changes and call git svn dcommit again, what is the simplest way to roll back the changes to the first version. 如果我使用git svn dcommit提交更改,然后进行一些更改并再次调用git svn dcommit ,那么将更改回滚到第一个版本的最简单方法是什么。 If I were working only locally, then git reset --hard HEAD^ would be fine, but I need this to work on the svn server. 如果我只在本地工作,那么git reset --hard HEAD^会很好,但我需要这个在svn服务器上工作。

Use git revert to make a new git commit that un-does the earlier change. 使用git revert进行一个新的git提交,取消先前的更改。 Then git-svn dcommit that to the svn server. 然后git-svn dcommit提交给svn服务器。 You would not use your git reset solution if you had pushed to a remote git repo either: It would confuse everyone who had pulled the intermediate revision that had your change. 如果您已经推送到远程git仓库,您将不会使用您的git reset解决方案:这会让所有已经撤消了您的更改的中间版本的人感到困惑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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