* Go to the [[Orion/Documentation/User Guide/Reference/Git Status page|Git Status page]] and click on the <b>Fetch</b> and <b>Merge</b> buttons shown in the [[Orion/Documentation/User Guide/Reference/Git Status page#Commits area|Commits Area]] on the page.

+

* Go to the [[Orion/Documentation/User Guide/Reference/Git Log page|Git Log page]] for the remote branch and click on the <b>Fetch</b> and <b>Merge</b> buttons in the toolbar.

== Pushing to a Remote ==

== Pushing to a Remote ==

+

You may push to a remote from a number of different Orion pages.

+

* Go to the [[Orion/Documentation/User Guide/Reference/Repositories page#Repository detailed view|Repository detail page]] and click <b>Push All</b> in the [[Orion/Documentation/User Guide/Reference/Repositories page#Pushing a local branch|Commits Section]] on the page. This will push changes in the current branch to its remote tracking branch.

+

[[Image:Orion-repository-page-branch-actions-push.png|Displaying commits on a branch]]

+

* Go to the [[Orion/Documentation/User Guide/Reference/Git Status page|Git Status page]] and click on the <b>Push All</b> button shown in the [[Orion/Documentation/User Guide/Reference/Git Status page#Commits area|Commits Area]] on the page.

+

* Go to the [[Orion/Documentation/User Guide/Reference/Git Log page|Git Log page]] for the local branch and click on the <b>Push All</b> button in the toolbar. In rare cases, you may want to use the <b>Force Push All</b> button to override the remote tracking branch content with your local branch content.

# The <b>Branches</b> section on the page will show you your most recently used branches.

+

# Click <b>View All</b> to see a list of all local and remote branches.

+

# You can checkout different branches, fetch, merge, rebase, and reset various branches. See [[Orion/Documentation/User Guide/Reference/Repositories page#Branches|Repository branches]] in the reference documentation for examples of these actions.

+

+

[[Image:Orion-repository-page-remotebranches.png|Remote branches]]

== Rebasing Changes ==

== Rebasing Changes ==

+

When you have been making commits in a topic branch, with the intention of pushing the code into a different branch, it is often useful to rebase those commits on another branch. Rebasing will make your commits appear as if the changes were made based on the code in another branch.

+

# First ensure that all of your changes are committed to your topic branch. This is typically done on the [[Orion/Documentation/User Guide/Reference/Git Status page|Git Status page]].

+

# Go to the [[Orion/Documentation/User Guide/Reference/Repositories page#Repository detailed view|Repository detail page]] and look for the branch you wish to rebase on in the <b>Branches</b> section. If the branch is not visible, click <b>View All</b> to see all local and remote branches.

+

# Now make sure that the branch you wish to rebase on is up to date. If you are rebasing on a remote branch, you will want to <b>Fetch</b> that branch. If you are rebasing on a local branch, you will want to temporarily make that branch current, and fetch and merge the branch.

+

# When you are sure that the branch you are rebasing upon is up to date, then [[Orion/Documentation/User Guide/Reference/Repositories page#Setting the active branch using checkout |checkout]] your topic branch (if it is not already the active branch) to make it active.

+

# Now find the other branch in the list and click on the <b>Rebase</b> icon.

+

[[Image:Orion-tasks-rebase.png|Rebasing a branch]]

== Making a Patch ==

== Making a Patch ==

+

Some development teams might use patches to distribute code changes rather than relying on git branches and commits. You can make a patch of your working changes in Orion.

# If the commit is found, you can open the [[Orion/Documentation/User_Guide/Reference/Git_Commit_page|Git Commit Page]] to work with the commit.

−

== Preparing a Code Contribution for Review ==

+

== Preparing a Commit for Review ==

+

# Open your commit in the [[Orion/Documentation/User_Guide/Reference/Git_Commit_page|Git Commit Page]].

+

# Click the <b>Ask for review</b> button to generate an email and link for finding and reviewing the commit. (See [[Orion/Documentation/User_Guide/Reference/Review_Request_page#Asking for Review|Ask for Review]] for details.)

== Reviewing a Code Contribution ==

== Reviewing a Code Contribution ==

+

If you receive a link (via email, message, bug report) to an Orion review, click the review link to open the [[Orion/Documentation/User_Guide/Reference/Review_Request_page#Asking for Review|Ask for Review]] page.

== Storing Credentials ==

== Storing Credentials ==

+

You may store your git repository credentials using the [[Orion/Documentation/User_Guide/Reference/Git_Credentials_Storage#Enable Storage|User Profile]] settings.

+

+

== Comparing File Changes in the Repository History ==

+

Sometimes it is necessary to see what changes have occurred to a particular file over time.

+

# Locate the file of interest in the [[Orion/Documentation/User_Guide/Reference/Navigator_page|Navigator]] page.

+

# Select the file and choose the <b>Git Log</b> link in the <b>Actions</b> menu.

+

# You can compare any change to the working copy using <b>Compare with working tree</b> or you can select two changes to review the differences between them.

Go to the Git Log page for the local branch and click on the Push All button in the toolbar. In rare cases, you may want to use the Force Push All button to override the remote tracking branch content with your local branch content.

Switching between Branches

The Branches section on the page will show you your most recently used branches.

Click View All to see a list of all local and remote branches.

You can checkout different branches, fetch, merge, rebase, and reset various branches. See Repository branches in the reference documentation for examples of these actions.

Rebasing Changes

When you have been making commits in a topic branch, with the intention of pushing the code into a different branch, it is often useful to rebase those commits on another branch. Rebasing will make your commits appear as if the changes were made based on the code in another branch.

First ensure that all of your changes are committed to your topic branch. This is typically done on the Git Status page.

Go to the Repository detail page and look for the branch you wish to rebase on in the Branches section. If the branch is not visible, click View All to see all local and remote branches.

Now make sure that the branch you wish to rebase on is up to date. If you are rebasing on a remote branch, you will want to Fetch that branch. If you are rebasing on a local branch, you will want to temporarily make that branch current, and fetch and merge the branch.

When you are sure that the branch you are rebasing upon is up to date, then checkout your topic branch (if it is not already the active branch) to make it active.

Now find the other branch in the list and click on the Rebase icon.

Making a Patch

Some development teams might use patches to distribute code changes rather than relying on git branches and commits. You can make a patch of your working changes in Orion.