英文:
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.
答案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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论