提交
向 Git 提交修改
- 访问Tools >Git >Local Repository 并选择Commit 。

General Information 显示提交的版本库和分支名称。
- 在Commit Information 中,查看并编辑修改的作者信息。
- 要绕过预提交和提交消息钩子,请选择Bypass hooks 。
- 如果您的项目使用签注,请选择Sign off ,在提交日志信息末尾添加作者签注的预告片。
- 在Description 中,输入提交信息。
- 在Files 中,选择要包含在提交中的文件。
- 选择Diff Selected Files 打开 "Git Diff Files"视图,在该视图中,你可以逐块或逐行查看改动并对其进行阶段划分。
- 选择Commit 开始提交。
要查看当前分支的日志,请选择Branch 中的分支名称。
对文件应用操作
打开Files 中的上下文菜单,可对文件应用操作。Open in Editor 和Show in File System 等操作适用于所有文件。其他操作的可用性取决于所选文件的状态。
- 要将未跟踪文件添加到版本控制中,请选择Stage 。要删除它们,请选择Remove 。要将它们添加到忽略列表,请选择Add to .gitignore 。
- 要将修改后的文件恢复到之前的状态,请选择Revert Unstaged Changes to <file> 或Revert All Changes to <file> 。要将整个文件分阶段提交,请选择Stage 。要取消提交,请选择Unstage 。
- 要恢复从版本控制中删除的文件,请选择Recover <file> 。
- 冲突文件会向Run Merge Tool 提供解决冲突的操作。对于已删除的文件,选择Resolve by Recovering 进行还原,或选择Resolve by Removing 删除文件。要解决其他合并冲突,请选择Resolve Conflicts with Ours 选择我们的版本,或选择Resolve Conflicts with Theirs 选择他们的版本。如果手动解决了冲突,请选择Mark Conflicts Resolved 将文件移出冲突状态。
另请参阅 "如何使用 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.