Visual Studio 2017,我不想提交Git中的某些 .cs 文件更改。

huangapple go评论58阅读模式
英文:

Visual Studio 2017, I don't want to submit some .cs file changes in Git

问题

I just want to push the Receptions.cs file to GitHub as seen in the screenshots. I don't want to submit the ReceptionForm.cs file.

英文:

I don't want to submit just some .cs file changes in Visual Studio 2017, Git. I am waiting to hear from the person who made the request to continue working on some files. According to the news, I will continue coding or undo the changes I have made. But in order not to waste time waiting for that news that I need right now, I started a new job and finished it. I just want to push the .cs file I just finished.

I just want to push the Receptions.cs file to GitHub as seen in the screenshots. I don't want to submit the ReceptionForm.cs file.

Visual Studio 2017,我不想提交Git中的某些 .cs 文件更改。

Visual Studio 2017,我不想提交Git中的某些 .cs 文件更改。

Visual Studio 2017,我不想提交Git中的某些 .cs 文件更改。

答案1

得分: 0

在最后的截图中,Stage 菜单项的目标是能够仅将您希望包含在接下来创建的提交中的更改添加到暂存区(也称为 '索引')。

因此,您可以将要提交或取消提交的文件分别加入暂存区。

顺便提一下:通常,git 允许您仅添加/暂存给定文件中所做的某些更改的部分,但如果我记得正确,这个 git 功能在此版本的 Visual Studio 中不受支持。

英文:

In the last screenshot, that's the goal of the Stage menu item to be able to add in the staging area (also called 'index') only the changes you want to put in the commit you will create next.

So you can stage or unstage respectly the files you want to commit or not.

Side note: Normally git even allows you to add/stage just some parts of the changes made in a given file but if I remember well this git feature is not supported by this version of Visual Studio.

huangapple
  • 本文由 发表于 2023年3月4日 01:01:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/75629930.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定