[英]TortoiseGit equivalence for 'TortoiseSVN --> Show log --> Revert to this revision'
I am looking for a TortoiseGit operation which is equivalent to:我正在寻找一个 TortoiseGit 操作,它相当于:
TortoiseSVN --> Show log --> Revert to this revision
In TortoiseSVN, this operation reverts the local repository to the revision selected, while keeping all changed files checked out.在 TortoiseSVN 中,此操作将本地存储库恢复为选定的修订版,同时保持所有更改的文件被签出。
In other words, the changed files show up when I do TortoiseSVN --> Check for modifications
, and I can easily discard those changes when I finish testing the revision that I have reverted to.换句话说,当我执行TortoiseSVN --> Check for modifications
时,更改的文件会显示出来,当我完成对已恢复到的修订版的测试时,我可以轻松地丢弃这些更改。
For some reason, I am finding it very difficult to perform this useful operation on TortoiseGit.出于某种原因,我发现在 TortoiseGit 上执行这个有用的操作非常困难。
The workaround that I am currently using is:我目前使用的解决方法是:
TortoiseGit --> Show log --> Export this revision...
执行TortoiseGit --> Show log --> Export this revision...
Is there a more straightforward manner for this?有没有更直接的方式呢?
I've tried the following TortoiseGit operations, but they just "cause havoc" on my local repository, and I am unable to proceed with the "standard" Commit & Push procedure afterwards:我已经尝试了以下 TortoiseGit 操作,但它们只是对我的本地存储库“造成严重破坏”,之后我无法继续执行“标准”提交和推送程序:
Reset "master" to this...
Switch/Checkout to this...
Rebase "master" onto this...
Revert change by this commit
I found a similar question here , but the answers suggest options that are not even viable in my TortoiseGit popup menu.我在这里找到了一个类似的问题,但答案建议在我的 TortoiseGit 弹出菜单中甚至不可行的选项。
Compare with working tree
右键单击提交,然后Compare with working tree
Added
ones and Rename
ones, and Right click, and Revert to revert xxxxxxx(sha1)
选择所有文件, Added
的文件和Rename
的文件,然后右键单击,然后Revert to revert xxxxxxx(sha1)
Added
ones, you need to deleted them manually对于已Added
的,您需要手动删除它们Renamed
ones, you need to rename them back manually对于Renamed
的,您需要手动重命名它们Changed Files
and refresh it to see if it is No differences found!
返回Changed Files
并刷新它以查看它是否未No differences found!
I found another batter way than I answered before, and you don't care about Renamed
and added
itme(s) in this way :我发现了另一种击球手方式,而不是我之前回答的方式,而且您不关心Renamed
并以这种方式added
itme :
Select all commits you want to revert, and right click on them, and click Revert changes by these commits
选择您要还原的所有提交,然后右键单击它们,然后单击Revert changes by these commits
Will be a progress dialog将是一个进度对话框
Then, ask you if perform the Commit.然后,询问您是否执行 Commit。 Click Commit
单击Commit
The commit dialog:提交对话框:
But, as you can see, TortoiseGit gives out one sha1 value, instead of all commit sha1 values you want to revert.但是,如您所见,TortoiseGit 给出了一个 sha1 值,而不是您想要恢复的所有提交 sha1 值。 So you may be want to add/modify more information there.所以你可能想在那里添加/修改更多信息。 Like this:像这样:
The log of that revert commit该还原提交的日志
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.