Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Help a newbie understand a private branch of a project on GitHub(What is the strategy, and how do I do it in Eclipse?)
Help a newbie understand a private branch of a project on GitHub [message #1747314] Sat, 12 November 2016 00:56 Go to next message
Gary Ford is currently offline Gary FordFriend
Messages: 3
Registered: August 2014
Junior Member
I'm a version control/git/EGit/GitHub newbie.

I have a Java project for which I want to use an open source project (RSyntaxTextArea) that is hosted on GitHub. Using the "Clone..." button in the "Git Repositories" view in Eclipse (Neon, Mac OS) , I cloned the "master" from the project (a Gradle project) from GitHub to a git repository on my machine, and I created an Eclipse project. It appears in my Package Explorer as "RSyntaxTextArea [RSyntaxTextArea master]".

I now need to make a local feature branch for development of a new feature that is idiosyncratic to my project. I will not be sending it back to GitHub (I'm not a committer for that project).

It seems to me that during the period that I am developing my feature, which involves adding some new classes and making changes to the project's master version, the people maintaining the master on GitHub may have made changes or bug fixes. I'd like those to be reflected in my final product as well.

So my question is this: what can/should I do in Eclipse to ensure that my feature branch is eventually merged into the most up-to-date version of my local master? When or how often do I need to do this?

Thanks.
Re: Help a newbie understand a private branch of a project on GitHub [message #1747406 is a reply to message #1747314] Mon, 14 November 2016 10:54 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 236
Registered: December 2015
Senior Member
You don't have to create a separate feature branch. You can just work in your local master branch. To update with remote changes just select the repository in the git repositories view and do "Pull..." or "Pull" from the context menu. Here's a pro tip: Don't click or do stuff that you are not 100% sure about what it's doing. So, if you want, go and try out stuff but only after pushing your work to a safe place, e.g. to some backup repository.
Re: Help a newbie understand a private branch of a project on GitHub [message #1749112 is a reply to message #1747406] Thu, 01 December 2016 22:19 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 962
Registered: July 2009
Senior Member
If you first want to have a look at the new commits from upstream before you merge them you can
first use "Fetch from upstream" to fetch new commits from the upstream repository. Then you can
have a look at these commits. And then decide if you want to merge them into your local branch.

In order to understand how to work with EGit you may want to have a look at the user guide [1].

[1] https://wiki.eclipse.org/EGit/User_Guide
Previous Topic:jgit console
Next Topic:How to get project created from git repository in workspace?
Goto Forum:
  


Current Time: Wed Nov 22 20:32:32 GMT 2017

Powered by FUDForum. Page generated in 0.02554 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software