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 Changes tool window by pressing Alt+9 or Shift+Alt+9 or choosing .
- Select the files or folders you want to commit.
- Open the Commit Changes dialog box by doing one of the following:
- On the Changes tool window toolbar, click the Commit Changes button
.
- On the main menu, choose .
- On the main menu, choose .
- Press Ctrl+K.
- On the Changes tool window toolbar, click the Commit Changes button
- In the Changed Files area, view the files changed since the last commit. Select the check boxes next to the files you want to commit now.
- In the Summary area, view statistics on changes made since the last commit.
- Add a comment and select the
Before Commit options
you want
PyCharm
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 commit --amend
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.