When you are finished editing files, you can commit them to source control. Committing a file adds your changes to the local Git database. It is a good idea to periodically commit files so that you have a backup in source control. When you are ready to add your local commits to the remote repository, you can push these files to the remote.
- Do one of the following, depending on the part of the user interface you are using:
- Ribbon Select the Source Control ribbon. In the File section select Commit (for selected files). Alternatively, in the Project section you can click Commit All (for all files in the project).
- Right-Click In the File List, right-click the file you want to commit and select Source Control > Commit (for selected files) or Source Control > Project > Commit All (for all files in the project).
- Local Toolbar In the File List, select the file(s) you want to commit. In the local toolbar of the File List, click , then select Commit (for selected files) or Project > Commit All (for all files in the project).
The Commit dialog opens. The selected files are listed with check boxes next to them.
- (Optional) Enter an optional comment tied to the commit. This enables you to keep an audit trail for a file. The comment can then be viewed from the History dialog, which can be accessed from the Source Control Explorer, the Source Control ribbon, or the Source Control button .
- (Optional) If you want to see all files with pending changes (rather than only those you selected), click .
- Make sure to click the check box next to each file you want to commit so that it contains a check mark.
- Click Commit.
- Select the View ribbon. In the Pane section select Source Control Explorer. The Source Control Explorer opens.
The Pending Changes pane opens. Files that will be committed are listed under Included Changes, and files that will not be committed are listed under Excluded Changes. You can identify modified files because they say [modified] next to the file name.
Note: When you modify a file in source control, you may sometimes see a SKL file alongside the XLF and original files. This skeleton file is a placeholder file. Be sure to commit all three associated files together. Committing just the SKL file may result in errors.
- (Optional) In the Comment field, enter an optional comment tied to the commit. This enables you to keep an audit trail for a file. The comment can then be viewed from the History dialog, which can be accessed from the Source Control Explorer, the Source Control ribbon, or the Source Control button .
(Optional) If you want to select the files or folders that you include in the commit, right-click a file or folder and select one of the following options from the context menu.
Exclude Excludes the selected file from the commit
Exclude Unselected Excludes all unselected files from the commit
Include Includes the selected file in the commit
Include Unselected Includes all unselected files in the commit
Click Commit to commit all of the files in the Included Changes list.