History | Edit

Oxygen XML Web Author includes a Git plugin that allows you to edit files stored in a Git repository (including GitHub, GitLab, and Bitbucket integrations). The procedure in this topic assumes that your system administrator has enabled this plugin in your installation of Oxygen XML Web Author.

Opening or Creating Files

To open a file stored in a Git repository or create a new file, go to the main Dashboard, click the tab for your particular Git file repository integration (GitHub, Bitbucket, or GitLab), and click the Open button to browse for existing files, the New button to create a new one. For detailed information about this process, see Dashboard - Creating or Opening Documents.

If your connection has not yet been configured, a dialog box will be displayed that provides instructions for configuring and selecting the URL for the connection. For more information, see Configuring a Plugin.

Committing Files to a Git Repository

To commit a file to a Git repository, select the Commit on Git action on the toolbar (or use the Ctrl + S (Command + S on OS X) shortcut). If you have push access, a Commit on Git dialog box will be opened that allows you to enter a commit message, choose the branch where the commit will be processed (you can also edit the name of the branch in this dialog box), and it also includes a Choose a previously entered comment drop-down menu that allows you to select a previously used commit message.

Figure: Commit on Git Dialog Box

If someone else has committed the current document since you last opened it (causing conflicts), a Commit Status confirmation dialog box will appear.

Figure: Commit Status Dialog Box

The Commit Status dialog box allows you to choose the following options:
  • Click here link - You can click the link at the top of the dialog box to see the difference between the two commits.
  • Merge and commit - Merges your changes with versions that were committed by other people and commits the merged changes.
  • Commit on a new branch - Creates a new branch that contains your version of the document so that you can merge the changes at a later time, after the conflicts have been solved.
  • Commit only my changes - Commits your changes regardless of whether or not there was a conflict, and the changes made by the other user are lost.
  • Cancel - Cancels the operation and your changes are not committed to the repository. Before canceling, you could click the link at the top to see the differences, correct the conflicts manually, and then commit afterwards using the Commit only my changes option.

Committing to a Repository Without Access Rights

If you try to commit a file on a repository that you do not have access to, a dialog box is displayed that allows you to enter or choose a commit message but you cannot choose a branch. It warns you that continuing will commit the file to a new branch and allows you to create an automatic pull request.

Figure: Commit Error Dialog Box

When you tap or click the Commit button, the Git connector will automatically do the following:
  • Fork the project into your account, if it is not already.
  • Create a new branch from the edited branch.
  • Commit your changes on this newly created branch.
  • Create a pull request from your newly created branch to the originally edited branch.
  • Switch the editor to your branch so further save operations will just add new commits to your branch, thus updating the pull request with new changes.