提交修改
暂存你的修改以提交它们,这样你就可以把它们推送到远程仓库或发送给 Gerrit 进行审核。
显示文件状态
默认情况下,Qt Creator 会在 "项目"、"文件系统"和"打开文档"视图中显示文件状态。状态每 10 秒自动刷新一次。
要自定义文件状态的更新频率,请执行以下操作
- 转到Preferences >Version Control >General 。
- 确保选择Show VCS file status with refresh interval 。
- 设置Qt Creator 请求 Git 更新文件状态的时间间隔(以秒为单位)。
设置当前文件的阶段
要标记一个新的或修改过的文件,以便提交到版本库,可通过以下任一方式设置文件阶段:
- 转到Tools >Git >Current File 并选择Stage <file> for Commit 。
- 右键单击项目或文件系统中的文件,然后选择Git >Stage 。
- 转到Tools >Git >Local Repository >Commit ,右键单击Files 中的文件并选择Stage 。
移除当前文件
要从暂存更改中移除当前文件,请通过以下方式之一解除文件暂存:
- 转到Tools >Git >Current File ,然后选择Unstage <file> from Commit 。
- 右键单击项目或文件系统中的文件,然后选择Git >Unstage 。
- 转到Tools >Git >Local Repository >Commit ,右键单击Files 中的文件并选择Unstage 。
阶段块或行
您可以在Git Diff视图中逐块或逐行提交变更。
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.