2

I set up egit to work with my GitHub repo on my university computer.
The repo has 5 branches including master and my local copy also has those branches so I can go to Team -> Switch to and select the desired branch in eclipse.

On my laptop I set up Egit and cloned the repo.
I selected all branches when importing however under Local in the git repositories tab it only has master, all the other branches are under Remote Tracking.
If I switch to a Remote Tracking branch make a change, commit and then push I get the following error:

An internal Exception occurred during push: Nothing to push.

Anyone know what I am doing wrong? thanks

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
sam
  • 2,469
  • 8
  • 37
  • 57

1 Answers1

3

If I switch to a Remote Tracking branch make a change, commit and then push I get the following error

You didn't create a local branch from your remote tracking branch you just switch to.
That means you are in a detached HEAD mode, hence the "nothing to push".
See "Git Lesson: Be mindful of a detached head":

(No HEAD:)

no head

Team -> Switch To -> New Branch

will be enough to fix the issue, and then push it to the remote.

(HEAD on the new branch:)

HEAD on the new branch

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