After a Git repository for a project is initialized, you need to add the project data to it.

If you have specified Git as the version control system for your project in the Settings dialog box, tab Version Control, PyCharm suggests to put each new file under Git control during the file creation.

To have Git ignore some types of files, configure files to ignore.

In this section:

  1. Switch to the Changes tool window.
  2. Navigate to the Unversioned Files node and choose Add to VCS from the context menu or press Ctrl+Alt+A.

    add_all_unversioned_files_to_vcs.png

  • Switch to the Changes tool window, expand the Unversioned Files node, and select the files to be added. From the context menu, choose Add to VCS, or press Ctrl+Alt+A.

    add_file_to_vcs.png

  • Switch to the Project tool window and select the files to be added. From the context menu, choose Git | Add or press Ctrl+Alt+A.

    add_file_to_git.png

See Also

Concepts:

Procedures:

Reference:

Web Resources: