This topic describes how to commit changes to a local Git repository. For information on uploading changes to a remote repository, see Pushing Changes to the Upstream (Git Push).
- Open the Version Control tool window by pressing Alt+9 or choosing .
- In the Local Changes tab, select the files or folders you want to commit.
- Open the Commit Changes dialog box by doing one of the following:
- On the tool window toolbar, click the Commit Changes button
. - On the main menu, choose .
- On the main menu, choose .
- Press Ctrl+K.
- On the tool window toolbar, click the Commit Changes button
- The Commit Changes dialog lists all files that have changed since the last commit. Select the check boxes next to the files you want to commit now.
- Add a comment in the Commit Message section and select the
Before Commit options
you want
IntelliJ IDEA
to perform on the files before committing them to the local repository.
To upload the committed changes to the remote repository immediately, select the Push Changes check box. The changes will be pushed to the pre-configured origin.
- In the Git section, configure the following settings:
- Use the Author drop-down list to specify the person who created the changes to be committed.
This may be necessary when you are committing changes made by another person.
-
If you want to replace already published commit, select the check box Amend commit,
see Git Basics: Undoing Things
for details.
- Use the Author drop-down list to specify the person who created the changes to be committed.
- Click Commit.
To save the changes in a text file, click the Create Patch button.