- Qt Creator Documentation
- git commit
- Qt Creator 20.0.0

git clean ◦ git diff

# git commit

To submit your changes to Git:

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

   Git Commit view 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.

Note: You can apply these actions also from the context menu in Projects, File System, and Open Documents.

Menu Item | Description
--- | ---
Add | Add untracked files to version control.
Stage | Stage a modified file for commit.
Unstage | Unstage a modified file.
Remove | Delete untracked files.
Add to .gitignore | Add untracked files to the ignore list.
Mark Untracked | Mark added files as untracked.
Revert Unstaged Changes to <file> | Revert unstaged changes in modified files to the previous state.
Revert All Changes to <file> | Revert all changes in modified files to the previous state.
Recover <file> | Restore files deleted from version control.
Run Merge Tool | Launch the merge tool to resolve conflicts in the file.
Revert Renaming | Revert renamed files to their previous names.

### Resolve conflicts

To resolve conflicts, select Run Merge Tool in the context menu of a conflicted file to resolve the conflicts with help of the merge tool. You can also select one of the following options:

Menu Item | Description
--- | ---
Resolve by Recovering | Restore deleted files from version control.
Resolve by Removing | Delete files from version control.
Resolve Conflicts with Ours | Choose our version of the file to resolve merge conflicts.
Resolve Conflicts with Theirs | Choose their version of the file to resolve merge conflicts.
Mark Conflicts Resolved | Mark the file as resolved after manually resolving the conflicts.

See also How to: Use Git and Using Git.