有没有一种方法可以还原到VS代码中的先前提交? [英] Is there a way to revert to a previous commit in VS code?

查看:46
本文介绍了有没有一种方法可以还原到VS代码中的先前提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Google搜索了它,但是找不到问题的答案.

I googled it but was unable to find the answer to the question.

谢谢.

P.S我知道我可以看到提交之间的更改以及工作树中的差异,但是我想知道如何在Visual Studio代码中重置为先前的提交

P.S I know I can see the changes between commits and the differences in the working tree but I want to know how to reset to the previous commit in visual studio code

推荐答案

如果选中了源代码管理图标,则单击右上角的省略号....

With the source control icon selected, if you then click the ellipsis ... at the top right.

在v1.48中,您将看到子菜单的选项列表:在 Commit 下的 Undo Last Commit .在 Changes 下是 Discard All Changes .

With v1.48 you will see a list of options for submenus: under Commit is Undo Last Commit. Under Changes is Discard All Changes.

这篇关于有没有一种方法可以还原到VS代码中的先前提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆