提交
向 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 等操作适用于所有文件。其他操作的可用性取决于所选文件的状态。
| 菜单项 | 说明 |
|---|---|
| Add | 将未跟踪的文件添加到版本控制中。 |
| Stage | 提交已修改的文件。 |
| Unstage | 取消提交修改过的文件。 |
| Remove | 删除未跟踪文件。 |
| Add to .gitignore | 将未跟踪文件添加到忽略列表。 |
| Mark Untracked | 将添加的文件标记为未跟踪。 |
| Revert Unstaged Changes to <file> | 将已修改文件中未缓存的更改还原为之前的状态。 |
| Revert All Changes to <file> | 将已修改文件中的所有更改还原为之前的状态。 |
| Recover <file> | 恢复从版本控制中删除的文件。 |
| Run Merge Tool | 启动合并工具解决文件中的冲突。 |
| Revert Renaming | 将重命名的文件还原为之前的名称。 |
解决冲突
要解决冲突,在冲突文件的上下文菜单中选择Run Merge Tool ,然后选择以下选项之一:
| 菜单项 | 说明 |
|---|---|
| Resolve by Recovering | 从版本控制中恢复已删除的文件。 |
| Resolve by Removing | 从版本控制中删除文件。 |
| Resolve Conflicts with Ours | 选择我们的文件版本来解决合并冲突。 |
| Resolve Conflicts with Theirs | 选择他们的文件版本来解决合并冲突。 |
| Mark Conflicts Resolved | 手动解决冲突后,将文件标记为已解决。 |
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.