Committing Source Control Files—Subversion
When you are finished editing files, you can commit them to source control. Committing a file overwrites the old copy of the file in the source control database with the new one from your local machine. So even if others will not be working on that file, it is a good idea to periodically commit files so that you have a backup in source control.
However, if that is not the case, the Resolve Version Conflict dialog opens to let you know that another user has already committed the file with changes. You can merge the files automatically if there are no conflicting changes (i.e., changes do not occur in the same location in the file). If there are conflicting changes, you can use the Merge Changes dialog to determine how changes are merged.
[Menu Proxy — Headings — Online — Depth3 ]
How to Commit Files to Source Control
- Do one of the following, depending on the part of the user interface you are using:
- Pending Changes Window Pane From the Source Control ribbon, open the Pending Changes window pane. Select the files in the window pane that you want to commit, and in the local toolbar click .
- Ribbon Select Source Control > Commit (for selected files) or Source Control > 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).
- (Optional) Enter a 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 check in so that it contains a check mark.
- If you have files locked and you want to keep them locked, select Keep locks. Doing this will overwrite the source control copies of the files so that they have the latest changes, but it lets you keep the file locked so others will know you are working on it.
-
Click Commit.
If no other users have also made changes to the file and committed in while you were working on it, your version of the file is committed.
However, if that is not the case, the Resolve Version Conflict dialog opens to let you know that another user has already committed the file with changes. You can merge the files automatically if there are no conflicting changes (i.e., changes do not occur in the same location in the file). If there are conflicting changes, you can use the Merge Changes dialog to determine how changes are merged. See Merging Source Control Files—Subversion.
How to Commit Files to Source Control Using the Explorer
- Select View > Source Control Explorer. The Source Control Explorer opens.
-
From the drop-down or the Home pane, select Pending Changes.
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 a 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 Included to commit all of the files in the Included Changes list.
If no other users have also made changes to the file and committed in while you were working on it, your version of the file is committed.
However, if that is not the case, the Resolve Version Conflict dialog opens to let you know that another user has already committed the file with changes. You can merge the files automatically if there are no conflicting changes (i.e., changes do not occur in the same location in the file). If there are conflicting changes, you can use the Merge Changes dialog to determine how changes are merged. See Merging Source Control Files—Subversion.
What’s Noteworthy?
Note Subversion will automatically lock a modified file when saving changes (if it is not already locked) if you selected the option to automatically check out files from source control when saving them. Because there is not a "checked out" status for Subversion files, these files will be marked as modified and can be committed.