初始化 Git 仓库

若要开始管理当前未处于版本控制下的项目目录,请访问Tools >Git ,然后选择“Create Repository ”。

Qt Creator 这将创建一个名为.git 的新子目录,其中包含所有必要的仓库文件。Qt Creator 还会创建一个名为.gitignore 的文件,其中包含不应被 Git 跟踪的文件模式(例如构建目录)。

Git 目前尚未跟踪项目中的任何内容,因此您需要创建一个初始提交,才能开始跟踪项目文件。

另请参阅 《如何使用 Git》《Git 使用指南》。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.