.vscode文件夹是否要提交给源代码控制?
在新项目中,除了设置之外,文件夹为空。json文件。这个文件夹里会有什么东西?它是特定于机器的,特定于开发人员的,比如。vs文件夹,因此不能提交?或者所有开发人员都应该共享这个文件夹,从而提交它?
.vscode/settings文件顶部的注释。json:
// Place your settings in this file to overwrite default and user settings.
{
}
这似乎意味着文件夹应该包含特定于项目的设置,因此应该包含在源代码中。此外,UserVoice上的这篇文章似乎暗示了一些类型会在那里,也建议它应该被提交。
和其他答案一样:没有。
举例来说,考虑一下Git 2.19(2018年Q3)选择的方法,它添加了一个脚本(在contrib/中)来帮助VSCode的用户更好地使用Git代码库。
换句话说,生成.vscode内容(如果它还不存在),不要对其进行版本化。
参见Johannes Schindelin (dscho)的commit 12861e2, commit 2a2cdd0, commit 5482f41, commit f2a3b68, commit 0f47f78, commit b4d991d, commit 58930fd, commit dee3382, commit 54c06c6(2018年7月30日)。
(由Junio C Hamano - gitster -在commit 30cf191中合并,2018年8月15日)
contrib: add a script to initialize VS Code configuration
VS Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux.
Among other languages, it has support for C/C++ via an extension, which offers to not only build and debug the code, but also Intellisense, i.e. code-aware completion and similar niceties.
This patch adds a script that helps set up the environment to work effectively with VS Code: simply run the Unix shell script contrib/vscode/init.sh, which creates the relevant files, and open the top level folder of Git's source code in VS Code.
和其他答案一样:没有。
举例来说,考虑一下Git 2.19(2018年Q3)选择的方法,它添加了一个脚本(在contrib/中)来帮助VSCode的用户更好地使用Git代码库。
换句话说,生成.vscode内容(如果它还不存在),不要对其进行版本化。
参见Johannes Schindelin (dscho)的commit 12861e2, commit 2a2cdd0, commit 5482f41, commit f2a3b68, commit 0f47f78, commit b4d991d, commit 58930fd, commit dee3382, commit 54c06c6(2018年7月30日)。
(由Junio C Hamano - gitster -在commit 30cf191中合并,2018年8月15日)
contrib: add a script to initialize VS Code configuration
VS Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux.
Among other languages, it has support for C/C++ via an extension, which offers to not only build and debug the code, but also Intellisense, i.e. code-aware completion and similar niceties.
This patch adds a script that helps set up the environment to work effectively with VS Code: simply run the Unix shell script contrib/vscode/init.sh, which creates the relevant files, and open the top level folder of Git's source code in VS Code.