2

I am working through a programming book and I want to branch off of master for each chapter, then merge back to master once the chapter is completed, but have the chapter specific branch show up in my github permanently. What is the best way to do this through the eclipse gui? I have already created the branch in eclipse, but I can't get it to create the duplicate project branch in github.

Github repository
-master
-chapter1
-chapter2
yellavon
  • 2,821
  • 12
  • 52
  • 66

2 Answers2

0

Did you push the branch?

git push origin chapter1

git push origin chapter2

...etc...

(Note: If you're using a graphical interface for git in eclipse you might consider adding that information to the question.)

  • Yes, I have been using git through eclipse. – yellavon May 04 '12 at 01:09
  • You might find this [guide](http://wiki.eclipse.org/EGit/User_Guide#Pushing_to_upstream) useful then. In particular look under the heading "Push Ref Specifications". –  May 04 '12 at 01:36
  • I followed that, but the Team => Push to Upstream button is greyed out. It's starting to look like I should just download GIT and run the commands instead of trying to integrate with egit. – yellavon May 04 '12 at 02:48
  • Personally the approach I take to learning is using my favorite text editor + terminal. Sometimes a powerful IDE like Eclipse can be a bit overwhelming for simple projects. –  May 04 '12 at 04:01
  • Thats true, but it is also helpful to learn egit on a simple project so when I start a large project, it won't all be new. – yellavon May 04 '12 at 14:26
0

If your "Team => Push to Upstream" is grayed, you need to specify the upstream address of your local Git repo in your Eclipse Egit configuration: see "Eclipse/Egit, Push to Remote menu choice is grayed out".

Check also your SSH2 config in the same EGit.

Finally, click on "Add all branches spec" in order to push all your local branches to the upstream repo:

refspecs

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250