Adding a File to Version Control

From RAD Studio
Jump to: navigation, search

Go Up to Version Control Systems in the IDE


After you add a new file to a project that is under version control system, you can either explicitly add the file to version control or wait until the next time you want to commit changes to version control.

The version control system in the IDE schedules newly added files for the next commit operation, and you can choose whether to commit the file at that time.

  1. In the Projects Window, right-click the project that contains the file you want to add to the repository.
  2. Select one of the following commands, depending on the version control system you are using:
    • For Subversion. Subversion > Commit and the command:
      • From Repository Root starts the commit operation at the top level of the repository.
      • From Project Directory starts the commit operation at the project directory.
      • Files in this Project commits only files in the selected project.
    The Commit dialog box appears.
    • For Git. Git > Commit and the command:
      • From Repository Root starts the commit operation at the top level of the repository.
      • From Project Directory starts the commit operation at the project directory.
    The Commit dialog box appears.
    • For Mercurial. Mercurial > Commit and the command:
      • From Repository Root starts the commit operation at the top level of the repository.
      • From Project Directory starts the commit operation at the project directory.
    The Commit dialog box appears.
  3. If the new file is not shown in the Commit to: <location> field, click Show unversioned files, located in the lower portion of the dialog box. A new file has the "Added" status in the Commit to: <location> field.
  4. Select the checkbox of the new file you want to add to version control.
  5. Type a log entry in the Comment field.
  6. Click Commit.


Note: The Commit dialog box does not display renamed files. You need to click Show unversioned files and select the renamed files so they are added to the commit.

See Also