Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git pull not pulling the latest revision

Tags:

git

github

We use Github for source control in our organization. Multiple developers continuously merge their changes to remote source repository. In my case I cloned the repository when two weeks back and there were multiple merges after that. Now I am trying to get the latest revision of the code using.

git pull origin master

I for sure know that there were multiple merges that have gone in since last time I cloned but pull command tells me that its already up to date. Am I missing anything here?

like image 498
Ram Avatar asked Nov 12 '12 03:11

Ram


2 Answers

git reset --hard HEAD~20 # some large number
git pull origin master

This fixed my problem with an un-pullable update. The idea is to push HEAD back far enough to clear up any confusion for git. Then make the desired pull.

like image 93
joel3000 Avatar answered Oct 23 '22 05:10

joel3000


One explanation would be that the latest commits have been done on another branch, as explained in "Git pull from my public repository not working".

The other possibility is for you to be in a detached HEAD mode.
That would make any git pull "up-to-date" since you are in any branch.

like image 2
VonC Avatar answered Oct 23 '22 03:10

VonC