Committing Files to a Repository
Ensure that you have saved all file changes.
Choose File > Source Control > Commit.
In the confirmation dialog, deselect any files that you do not wish to commit.
Review and edit (as appropriate) any changes to be committed.
Enter a commit comment.
Commit changed files to ensure that those changes are preserved and managed as part of a repository.
You can use the confirmation dialog to compare your new version with any past version and to make any necessary edits in the current version. Any changes you make as you review a file are included in the committed file and saved in your project.
If you’re using Subversion, a commit operation copies the changes from selected files into the remote Subversion repository. Therefore, you must be connected to the repository before you can commit changes. (For details, see your repository administrator.)
If you’re using Git, the commit operation adds your changes to your local working copy. If you're using a remote Git repository, you have to perform a push operation to add your committed changes to the shared repository.
A commit comment is required; the Commit button is disabled until you enter one. Good comments are specific, but concise; suggested content includes a brief description of the changes, what they are meant to accomplish, and URLs or ID numbers of any relevant bugs. The version editor displays the affected code together with your name and commit comment, so you can omit information that’s in code comments or that’s obvious from looking at the line of code.
The video shows committing changes in four files in the Sketch project to a local Git repository.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-02-16)