Committing Edits

Why do I have to commit edits? If you open and view a file, it is in a committed state in the project’s repository. If you click to edit a file, it then enters a “workspace mode,” essentially making a working copy of the file from the repository. In this mode, the file is in a non-committed state with pending changes. When editing is completed, the file needs to be committed back to the project’s repository.

Permission Required?

Editing content and project files is an activity available to users with the Author status. By default, users with Author status have the following permissions set:

  • If this is deselected, then viewing files in a read-only mode is allowed. On the left side of the page, the Files vertical three-dot menu is not available.

  • If this is deselected, the XHTML in the Code view is read-only.

    Editing code is regarded as a capability for an advanced user. If not done properly, the code can become malformed quickly. Administrators can prevent users from editing the code by deselecting the Edit Code permission.

For more information about permissions, see Setting User Permissions or Setting Team Permissions.

Guidelines for Committing Edits

In general, be aware of the following when committing edits:

  • Single file If you are editing a file and click Commit, you are committing what you are looking at in the editor. It can contain edits just from you (one user), or edits from several authors in the same file. (You can also commit a single file via the Workspace Overview.)

  • Multiple files Instead of committing a single file, you can bulk commit multiple files at once. Note that many files can be in an uncommitted state which might contain edits from you and other authors.

  • Navigating to other files When you work in a file, you can move to another file and work in that, then move to a third file and make changes, and so on. In other words, you do not need to commit an open file before navigating elsewhere. The changes in each file are automatically saved, but they won't be added to the repository until you (or another author) finally perform a commit.

  • Committing edits can affect other users Because collaborative authoring is always happening, authors performing a commit are doing so not only for their changes, but also for any other author's changes for the same file. For this reason, it's important to stay in communication with other authors to make sure you are not committing changes that they do not yet wish to be committed. However, the editing process includes safeguards and visible cues in the interface to commit files without issues.

How to Commit Edits

Do one of the following:

  • In the Content Editor, from the upper-right corner of the workspace, click Commit.

  • In the Workspace Overview, select a file (i.e., the check box next to the file in the grid) and from the upper-right corner click Commit. Alternatively, click the vertical three-dot icon next to the file and select Commit. You can bulk commit files with edits. See How to Commit Multiple Files at Once.

What’s Noteworthy?

Note It is a best practice to simultaneously commit all related files based on the changes you are making. For example if you edited four files to complete a changed feature, then commit all four files together when your changes are done. This ensures a completed collective version of your work in the revision history that you can view and revert back to.

Note Until commits are made, changes from those files will not be included in any builds that are generated.