- Remove all projects to clean your workspace
-
Otherwise if you are using Github or thelocal version
Clone the HelloWorld-8.git remote repository (into the workspace folder) -
Add the line:
System.out.println("Hello EclipseCon!");
to theMain.java
file -
Commit this change
-
Go to the History view. It should look like this:
-
Click on
HelloWorld-8 > Team > Fetch from Upstream
.
A pop-up window will appear listing all remote changes
Note
TheFetch ...
item allows more fetch options but for a simple fetch theFetch from Upstream
item is sufficient. -
The History view should now look like this:
The local and remotemaster
branches have diverged -
Click on
HelloWorld-8 > Team > Pull
to incorporate the remote changes in your local branch. A pop-up window will appear listing all remote changes
Note
You can bypass the fetch action, it is always executed before a pull. -
Click on
HelloWorld-8 > Team > Push to Upstream
. A pop-up window will appear detailing what has been uploaded.
Warning
You can only push a branch when it is ahead of its remote counterpart.
To be sure of this, you should pull before pushingNote
ThePush ...
item allows more push options but for a simple fetch thePush to Upstream
item is sufficient.
Note
The exercise uses a single branch, however all the actions detailed earlier to uses several branches
will also work in remote workflows.