Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Orion/Documentation/User Guide/Tasks/Working with Git

< Orion‎ | Documentation‎ | User Guide
Revision as of 10:47, 18 October 2012 by Susan franklin.us.ibm.com (Talk | contribs) (Working with Git)

Working with Git

Cloning a Repository

  1. Go to the Repositories page
  2. Click Clone Repository in the tool bar.
  3. Type or paste in the URL for the repository in the prompt.
    1. By default, a folder will be created using the name of the Git repository. Press Enter or click Submit to get the default folder.
    2. Click the <More> button in the prompt if you wish to provide a different name or clone the repository into an already existing folder.
    3. Press the Esc key to cancel the clone if you change your mind.

Clone a repository

Committing Changes

  1. Go to the Git Status page
  2. Click on each change to compare the changes and stage them.
  3. Commit the staged changes to your repository.

Fetching and Merging from a Remote

You may fetch and merge from a remote from a number of different Orion pages.

Pull a repository

  • Go to the Repository detail page.
    • Click Pull in the toolbar to pull (fetch and merge) the repository. Changes are merged into your active branch.
    • Click Fetch in the Commits section to fetch the remote tracking branch for the current branch. Click Merge to merge with the local branch.
    • Locate a particular branch in the Branches section and click Fetch to fetch that branch. Click Merge to merge with your active branch.
  • Go to the Git Status page and click on the Fetch and Merge buttons shown in the Commits Area on the page.
  • Go to the Git Log page for the remote branch and click on the Fetch and Merge buttons in the toolbar.

Pushing to a Remote

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

  • Go to the Repository detail page.
    • Click Push All in the Commits Section on the page. This will push changes in the current branch to its remote tracking branch.
  • Go to the Git Status page and click on the Push All button shown in the Commits Area on the page.
  • 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

  1. Go to the Repository detail page.
  2. The Branches section on the page will show you your most recently used branches.
  3. Click View All to see a list of all local and remote branches.
  4. You can checkout different branches, fetch, merge, rebase, and reset various branches. See Working with branches in the reference documentation for examples of these actions.

Rebasing Changes

Making a Patch

Applying a Patch

Finding a Commit

Preparing a Code Contribution for Review

Reviewing a Code Contribution

Storing Credentials

Comparing Changes in the Repository History

Copyright © Eclipse Foundation, Inc. All Rights Reserved.