1

As a git noob, Eclipse is not helping my confusion... I switched to me local master branch and ran a fetch with the settings below:

enter image description here

Firstly I don't understand why the "Next" button is disabled. Secondly when I run the fetch using "Finish", it tells me I am already up to date (makes sense as I already fetched). So what does the ↓13 mean? Isn't it telling me my local branch is behind the remote branch? Or that the remote branch is itself behind... but this is the remote master so what can it be behind of?

Mr. Boy
  • 60,845
  • 93
  • 320
  • 589

1 Answers1

1

It means that you are 13 commits behind the origin.

If the arrow is pointing up, that means that your branch is X commits ahead of the origin.

As far as your Next button being grayed out. I believe it's because you havn't selected the Ref yet. Click the ref, and then you should see it.

FYI - when i started out with Git, i tried to use the eGit plugin for Eclipse, and I can say to you as a new person in Git. Use command line! I've had my local git repositories corrupted from the plugins, and it's not very intuitive.

ddavison
  • 28,221
  • 15
  • 85
  • 110
  • If I fetched and it tells me I am up to date, how am I still 13 commits behind? – Mr. Boy Jul 29 '13 at 15:32
  • Fetch just fetches the changes.. it doesn't actually update your code to match. You need to do a merge. then you'll see it.. or more simply, use "Pull" which does the fetch and merge in 1. take a few minutes to read this - http://stackoverflow.com/questions/292357/whats-the-difference-between-git-pull-and-git-fetch – ddavison Jul 29 '13 at 15:33
  • i agree with sircapsalot...eGIT is not somehow very intuitive.It neither clears the git concepts nor helps to work with it. I also understood best with command line. – saurav Jul 29 '13 at 15:33
  • @sircapsalot at the risk of sounding dumb, if fetch doesn't updateyour local branch where does it put the fetched changes? And what's the point of fetching rather than just merging from the remote branch? – Mr. Boy Jul 29 '13 at 15:37
  • It's perfectly ok. When you initialize a git repo, it creates a ".git" folder. when you do a `git fetch`, all it does is pull down the commit history, so it's aware what has changed, but doesn't actually merge anything, and puts that information in the .git folder somewhere. Read http://gitref.org/remotes/#fetch here as well. as you use git more and more, it'll become more english-ey ;) – ddavison Jul 29 '13 at 15:41
  • eGit has become very good in the last year or so. How old are your experiences? (other than that I agree, command line mastery is important) – Thorbjørn Ravn Andersen Jul 29 '13 at 16:12
  • personally - i DO use eGit only to show my edits.. from time to time, I do use Team->Add Team->Ignore, etc with eGit, but for the most part, any wide-scale operation, i use command line. my experiences with it from doing actions like this, were when i started using Git back in February – ddavison Jul 29 '13 at 17:37