In an attempt to stream line and improve Git workflows, we have started on a redesign of the Git pages in Orion 6.0
From Many to One
One of our main design goals was to reorganize all of the git functionality from multiple pages down to one. We used to have individual pages or views on pages for:
- git status
- git log
- git repository
- all git repositories
- git configuration options
With the exception of the all git repositories page (which we are in the process of redesigning), all of the other pages have been merged into the current Git page which looks like this (with sections collapsed):
Let’s take a look at what’s in each of these sections. Starting from the very top:
At the very top of the page, we have the name of the repo along with buttons that perform repo-level actions:
- Apply Patch: brings up a dialog that lets a user select the URL or file that contains the patch
- Pull: Performs a Pull on the repo (fetch + rebase)
- Delete: Deletes this repo
This section replaces the old git status page – it will show you the current state of your working directory. With no files changed, the section looks like this:
The top of the section contains the 2 main section buttons:
- Discard: discard any changes made to selected files and revert the files to their previous committed state
- Commit: commit selected files with the messaged entered in the message box
Next down comes the message box area which is used to enter a commit message – notice the 2 checkboxes. Amend Previous Commit can be toggled to amend the previous commit (the previous message will be fetched and displayed in the message box). Prepare for Gerrit will add a ChangeId to the commit message.
When files are changed, they appear in a table under the message box:
The files can be expanded to reveal the changes made:
Note that you can also choose to view the diffs side by side or open a compare editor to view the diffs.
You can select the files to include in the commit by using the checkboxes (or the select all checkbox if you want to include all files). As you select files, a number counter at the top of the table changes to match your selected file count.
Once you have selected your files (and typed in a message) you can hit Commit to commit them (or Discard to discard the changes made).
When you have files selected, a Show Patch link appears on the same line with the Commit and Discard buttons. This will create a patch for you out of the files that you have selected.
The commits section has been redesigned with some new sub-sections.
- Outgoing: this section lists all of the commits that have not been pushed yet to the remote repo
- Incoming: this sections lists all of the commits that have not been merged into the local repo
- History: this section lists all of the commits that the local branch has in common with the remote branch.
Let’s see what happens, when we commit the change from the previous section:
The commit shows up in the Outgoing section. Note that there is a new Undo button that will let you undo the commit and restore the changed files back into your working directory (a soft reset).
Before pushing, you want to be sure that you are caught up to all changes, so you can hit Fetch in the Incoming section to fetch the latest changes. All of the changes that haven’t been merged will show up and you can accept them by hitting Rebase or Merge.
The accepted changes now show up in the History section. You can scroll down to view the the history, or hit the “More commits for <Branch>” to load more entries.
Once you are all up to date with the remote branch, you can Push your changes.
There is also a new button Sync which is combination of Fetch/Rebase/Push.
Changes in a Commit
Expanding any commit in the history will reveal the changed files (this is true for any place a commit is shown on the page) :
Branches and Tags
The branches and tags sections have been merged into one section as well. There are top level items for local branches, remotes and tags. The 2 buttons in this section are:
- New Remote: brings up a dialog to add a new remote
- New Branch: brings up a dialog to create a new branch
If you expand the local item, you will see all of the local branches you have for the current repo – you can check a branch out from here.
If you expand the branch – you will see the log for that branch along with all allowable actions next to each commit.
Each remote can be expanded to reveal all of its remote branches along with applicable actions for each entry.
You can see the log for a remote branch by expanding it.
The tags section follows the same pattern – expand the top level item and you are presented with the list of tags along with all available actions for that tag.
The configuration section is now being rendered as a table.
More to Come
Although the Git page is in a reasonable state right now, we have some future improvements planned that will truly allow for a one page design. Stay tuned for more!