Skip to main content
Jump to: navigation, search

Difference between revisions of "Orion/Documentation/User Guide/Reference/Repositories page"

(Deleting a local branch)
(Merging from the remote tracking branch)
Line 45: Line 45:
 
You can navigate to the [[Orion/Documentation/User Guide/Reference/Git Log page|Log page]] to see details on the branch. From the actions next to the branch, the link <b>Git Log</b> will take you to the Git log page.
 
You can navigate to the [[Orion/Documentation/User Guide/Reference/Git Log page|Log page]] to see details on the branch. From the actions next to the branch, the link <b>Git Log</b> will take you to the Git log page.
  
=== Merging from the remote tracking branch ===
+
=== Merging branches ===
  
You can also perform a merge action if there is a remote tracking branch. But normally the remote branch does not exist for a newly created branch until you <b>push</b> it. From the actions next to the branch, click the <b>Merge</b> icon to merge from the remote tracking branch into your local working copy.  
+
Merging branches typically involves two branches. The branch whose actions you are working with, and your active branch. For example, clicking the <b>Merge</b> icon for your newly created branch will merge its content to your active branch.  You can also merge from remote branches.  
  
 
[[Image:Orion-repository-page-branch-actions-merge-local.png|Merge button]]
 
[[Image:Orion-repository-page-branch-actions-merge-local.png|Merge button]]
  
<b>Please note</b> that you can achieve the same result by performing the same action in [[Orion/Documentation/User Guide/Reference/Git Log page|Log page]] or [[Orion/Documentation/User Guide/Reference/Git Status page|Status page]].
+
<b>Please note</b> that you can also merge branches in the [[Orion/Documentation/User Guide/Reference/Git Log page|Log page]] or [[Orion/Documentation/User Guide/Reference/Git Status page|Status page]].
  
 
=== Setting a local branch as current branch===
 
=== Setting a local branch as current branch===

Revision as of 11:58, 15 October 2012

Repositories page

The Repositories page allows you to view and manage the Git repositories associated with your Orion account. When you visit this page you will see a list of all Git repositories you currently have cloned.

Repositories page

To see detailed information about a repository, click its name. The detailed view includes all the usual Git repository details such as name and url. Additional sections on the page enumerate things like index state, incoming and outgoing commits, branches, and tags. You can open and close most sections on the page using the twistie icon adjacent to the section name. The branches and tags sections show you the most recently used items, but you can click the associated View All links to see full lists of anything.

Repository details

Repository configuration

The bottom of the repository page shows the configuration of the repository. On the main page you will see just user.*. To see the full list, click View All. From here you can add additional configuration properties to the repository, and change or delete properties.

Repository configuration

Adding repositories

Create a new empty repository by clicking Init Repository on the tool bar, or click Clone Repository to clone an existing Git repository. Cloning will produce a dialog where you enter the Git repository URL, and optionally any credentials required to access or modify the repository.

Actions on a repository

You can pull the latest content, apply a patch, or delete an existing repository from the main toolbar on the page. The Related menu allows you to navigate to other views on the repository, such as viewing the repository content on the Navigator page or working with the repository changes on the Git Status page.

Repository actions

Adding branches

Once a repository is created or cloned, the master branch is set as the current branch. You can create your own branch, work on it and merge it back to master. To create a new branch, click the New Branch button, type in the new branch name, and press the 'Enter' key or click the Submit button.

Branch name dialog

Actions on a local branch

Once a new branch is created, it is in the local repository but not in the remote yet. Next to each branch is a row of buttons as below. You can manage the branches using these actions.

Action buttons

Deleting a local branch

From the branch actions, click the delete icon to delete a local branch. A confirmation dialog will pop up, providing you a chance to confirm your decision.

Delete button

Navigating to log page

You can navigate to the Log page to see details on the branch. From the actions next to the branch, the link Git Log will take you to the Git log page.

Merging branches

Merging branches typically involves two branches. The branch whose actions you are working with, and your active branch. For example, clicking the Merge icon for your newly created branch will merge its content to your active branch. You can also merge from remote branches.

Merge button

Please note that you can also merge branches in the Log page or Status page.

Setting a local branch as current branch

The newly created branch branch is not set as the current branch yet. Let's say you want to work on this branch now. From the actions next to the branch, click on the last action to checkout the branch.

Checkout button

Once a branch is checked out, it is shown as bold. Please note that from now the Git Status page will show the content on this branch.

Active branch is bold

Pushing a local branch

Once a branch is checked out, the actions next to a branch appear as follows:

Push All button

Clicking on the Push All action will create a remote tracking branch if there is not one yet.

Please note that you can achieve the same result by performing the same action in Log page or Status page.

Fetching remote branches

If somebody else has pushed their branches into their repository/Remote/origin but those branches do not appear in your repository/Remote/origin yet, you have to fetch them first. Let's say somebody has pushed a branch called newBr1 in the remote. See the Remote/origin row in the Remotes section for the action icons.

Remotes section

Click Fetch, and enter your credentials if required to access the repository. The remote branches are updated.

Remotes section (updated after fetch)

Actions on a remote branch

The main page for a repository only shows some of your recently used local branches. To view remote branches, click View All in the toolbar at the top of the Branches section.

Many of the actions on a remote branch are different from those on a local branch, but the Git Log and Merge actions are the same. The Git Log action will navigate to the same log page but with the remote branch content. You can also switch to the local branch content there. Next to the remote branch name row in the Remote table, you will find the actions for managing that remote branch.

Branch actions

Checking out a remote branch

Normally a newly fetched remote branch is not in your local branches yet. You have to checkout in order to work on it. From the actions next to the branch, click the Checkout icon.

Checkout button

The remote branch is checked out as the current local branch.

Branches view (updated after remote branch checkout)

Please note that if you try to check out a remote branch that already has a local branch in your repository, you will get a warning message : "the local branch already exists".

Fetching and merging content of a remote branch

You can fetch a remote branch and merge it to your active local branch. First, click View All in the Branches section of the page. This will show all local and remote (tracking) branches associated with the repository. From the actions next to a remote branch, there is a button to Fetch the latest contents from the remote into your personal remote tracking branch. Then, you can Merge or Rebase those changes into your active local branch.

Merge/Rebase buttons

If you want to fetch and merge changes for your active branch, you can also use actions in Commits section.

Commits section header

Please note that you can achieve the same result by performing the same actions in Log page or Status page.

Resetting local index from a remote branch

You can also reset a local branch to replace with the contents of the remote tracking branch.

Reset button

From the actions next to the remote branch, click the Reset icon to reset the local branch content. A dialog will pop up asking for confirmation.

Confirm dialog

Back to the top