- Qt Creator Documentation
- git commit
- Qt Creator 18.0.2

git clean ◦ git diff

# git commit

To submit your changes to Git:

1. Go to Tools > Git > Local Repository and select Commit.

   General Information shows the names of the repository and branch for the commit.

2. In Commit Information, check and edit information about the author of the changes.
3. To bypass pre-commit and commit message hooks, select Bypass hooks.
4. If your project uses signoffs, select Sign off to add a signed-off-by trailer by the author at the end of the commit log message.
5. In Description, enter a commit message.
6. In Files, select the files to include in the commit.
7. Select Diff Selected Files to open the Git Diff Files view, where you can view the changes and stage them chunk-by-chunk or line-by-line.
8. Select Commit to start committing.

To view the log of the current branch, select the branch name in Branch.

## Apply actions to files

Open the context menu in Files to apply actions to files. Actions like Open in Editor and Show in File System are provided for all files. The availability of other actions depends on the state of the selected file.

- To add untracked files to the version control, select Stage. To delete them, select Remove. To add them to the ignore list, select Add to .gitignore.
- To revert modified files to the previous state, select Revert Unstaged Changes to <file> or Revert All Changes to <file>. To stage the whole file for commit, select Stage. To unstage it, select Unstage.
- Select Recover <file> to restore files deleted from version control.
- Conflicted files provide actions to Run Merge Tool for conflict resolution. For deleted files, select Resolve by Recovering to restore them or Resolve by Removing to delete the file. To resolve other merge conflicts, select Resolve Conflicts with Ours to choose our version or Resolve Conflicts with Theirs to choose their version. If you resolved the conflicts manually, select Mark Conflicts Resolved to move the file out of conflicted state.

See also How To: Use Git and Git.