-
Notifications
You must be signed in to change notification settings - Fork 19
Forks
In GitHub, a fork is "a personal copy of another user's repository that lives on your account." The material on this page is adapted from the GitHub documentation, for use with Eclipse.
This section will describe how to configure a remote for a fork in Eclipse. For instructions on how to do this from a Git command line, see the GitHub documentation.
A remote repository is a version of your project that is hosted on the Internet or network somewhere. If you followed the steps to set up Eclipse with Tincr, you will be interacting with two remote repositories: the official repo hosted at https://github.com/bradselw/tincr and your own forked copy. Additionally, there is a local (not remote) repo that you have cloned to your machine.
You will probably want to keep your local and forked repos in sync with the original so that you can receive updates that have been pushed to the original. The way to do that using Eclipse is to configure a remote for the official repo:
- In Eclipse, open the Git Repositories view
- Right-click on the root of the local repo
- "Team" -> "Show in Repositories View"
- In the Git Repositories view, create a remote
- Expand the
tincr
element - Right-click on "Remotes" -> "Create Remote..."
- Configure the remote
- Remote name:
official
- Select
Configure fetch
- Click "OK"
- Click "Change..." next to "URI"
- URI:
https://github.com/bradselw/tincr.git
- Leave default values for all other fields (User and Password should be your GitHub credentials)
- Click "Finish"
- Click "Save and Fetch"
This section describes how to merge changes from the official repository into your fork from Eclipse. For instructions on how to do this from a Git command line, see the GitHub documentation.
To get the changes from the official repo into your forked repo, you will need to first merge the official repo to your local repo and then push the changes to your forked repo:
- Merge the upstream repo with your local repo
- In Eclipse, right-click on the root of the local repo (in Eclipse, it is the "project" you created when you installed Tincr)
- "Team" -> "Merge..."
- Expand "Remote Tracking"
- Select the remote and branch (i.e. "official/master")
- Leave other options at default values
- Click "Merge"
- Push the changes to your fork
- In Eclipse, right-click on the root of the local repo
- "Team" -> "Push to Upstream..."