I have an Eclipse Project which is maintained in git. After the first commit, yesterday I added new files directly to the master branch (which I later realized was wrong, and should have created a local branch). Today I tried to create a local branch on two machines and tried to push the codes on the respective machines.
STEPS:
On one machine I could go through these steps smoothly. I am getting stuck on the other machine at #2. I am unable to find the Fetch from Upstream option. I only see Fetch from origin, and when I click on that, system prompts "No ref to fetch".
In that case, revert to command-line, and check on both machine:
cd /path/to/repo
git config -l
Try and compare in both the remote and branch section like:
remote.origin.url=https://gitlab.com/<user>/<project>
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
By setting them identical between the two machines repositories, you should then be able to switch back to Eclipse and see the same options again.