如何在 VSCode 中提交对文件的一些更改,而不是其他文件? [英] How can I commit some changes to a file, but not others, in VSCode?

查看:35
本文介绍了如何在 VSCode 中提交对文件的一些更改,而不是其他文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VSCode 具有出色的 git 集成,但我找不到进行部分提交的方法.基本上,我希望能够在我的文件中选择特定更改并暂存它们,而无需暂存整个文件.git CLI、Github 原生应用和 Atom 插件支持此功能.

VSCode has excellent git integration but I can't find a way to do partial commits. Basically, I want to be able to select specific changes in my files and stage them without staging the entire file. This functionality is supported by the git CLI, Github native apps, and Atom plugins.

主要是确保我在开票之前不会遗漏任何东西.

Mostly making sure I'm not just missing something before opening a ticket for it.

推荐答案

  • 打开源代码管理视图,然后单击更改的文件以打开比较.

    • Open up the Source Control view, then click a changed file to open the comparison.

      选择您要上演的台词.

      点击..."然后Stage Selected Ranges.

      这篇关于如何在 VSCode 中提交对文件的一些更改,而不是其他文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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