版本控制
Version Control Systems or VCS (Git, SVN, Perforce, Mercurial, Bazaar, CVS, TFS, etc.) are used to manage changes to code and data, and enable teams to coordinate their development efforts. To make tracking of changes efficient and reduce the amount of disk space required, you should know which files must be tracked by the VCS and which can be ignored.版本控制系统或 VCS(Git, SVN, Perforce, Mercurial, Bazaar, CVS, TFS 等)用于管理代码和数据的更改,并使团队能够协调他们的开发工作。为了有效地跟踪更改并减少所需的磁盘空间量,您应该知道 VCS 必须跟踪哪些文件以及可以忽略哪些文件。
Ignore List忽略列表#
In any project there are files and folders that are not subject to version control. These can be files created by the compiler, *.obj, *.tlog, or an output folder used to store binary executables.在任何项目中都有不受版本控制的文件和文件夹。这些可以是编译器创建的文件、*.obj、*.tlog 或用于存储二进制可执行文件的输出文件夹。
The following files and folders in you project's root can be ignored, as they are generated automatically on your disk:可以忽略项目根目录中的以下文件和文件夹,因为它们是在您的磁盘上自动生成的:
Common ignore list for every API and IDE每个 API 和 IDE 的通用忽略列表#
- .thumbnails
- bin
在更新引擎版本或在 SDK 浏览器中重新配置项目之前将此文件夹添加到版本控制中,以向所有开发人员提供更新后的 bin。
- data/microprofile_dump_html
- junk
- obj
- source/x64
- CMakeCache.txt
- source/**/*.obj
- unigine_editor.cfg
- *.cache
- *.modified
- *.tlog
.thumbnails
bin
data/microprofile_dump_html
junk
obj
source/x64
CMakeCache.txt
source/**/*.obj
unigine_editor.cfg
*.cache
*.modified
*.tlog
Additional ignore list for C++ (CMake) projectsC++ (CMake) 项目的附加忽略列表#
Add these entries to the common .gitignore specified above when developing projects based on C++ (CMake).将这些条目添加到常见的基于C++ (CMake)开发项目时,上面指定.gitignore。
- build-*
- CMakeFiles
- CMakeScripts
- CMakeCache.txt
- cmake_install.cmake
- CMakeUserPresets.json
- compile_commands.json
- CTestTestfile.cmake
build-*
CMakeFiles
CMakeScripts
CMakeCache.txt
cmake_install.cmake
CMakeUserPresets.json
compile_commands.json
CTestTestfile.cmake
Additional ignore list for C++ (Visual Studio 2015+) projectsC++ (Visual Studio 2015+) 项目的附加忽略列表#
Add these entries to the common .gitignore specified above when developing projects based on C++ (Visual Studio 2015+).将这些条目添加到常见的.gitignore 在开发基于 C++ (Visual Studio 2015+) 的项目时指定。
- .vs
- *.vcxproj.user
- *.VC.db
- *.opendb
- *.opensdf
- *.pro.user
- *.sdf
- *.suo
.vs
*.vcxproj.user
*.VC.db
*.opendb
*.opensdf
*.pro.user
*.sdf
*.suo
Files and Folders to Add to Version Control添加到版本控制的文件和文件夹#
The following files and folders should be subject to version control:以下文件和文件夹应受版本控制:
data folder with all its contents data包含所有内容的文件夹
If you do not want to share the editor and application settings with other team members, add the following configuration files to .gitignore:- data/configs/unigine.user
- data/configs/default.user
- data/.editor2/*
- data/configs/unigine.user
- data/configs/default.user
- data/.editor2/*
-
source folder contents except for the elements mentioned above source 文件夹内容,上述元素除外
This folder is created only for projects that use C++ or C# API.此文件夹仅为使用 C++ 或 C# API 的项目创建。 -
*.cache files containing compiled shader cache *.cache包含已编译着色器缓存的文件
When team members develop a project using different GPUs or/and driver’s version for their machine configuration, it is better to add the shader cache files to .gitignore since these file will be recompiled by an end developer’s computer.当团队成员为他们的机器配置使用不同的 GPU 或/和驱动程序版本开发项目时,最好将着色器缓存文件添加到 .gitignore,因为这些文件将由最终开发人员的计算机重新编译。 - *.project file (and *.csproj for C# projects) *.project 文件(和 *.csproj 用于 C# 项目)