0

So currently, there are 4 commits(the most recent 4) in origin/master that are not in my remote repository or my local repository.

When I use git pull, it tells me that I'm already up to date, but using git log clearly shows that I don't have the 4 newest commits that origin/master has. I can push changes to my remote no problem, so I'm fairly certain that the problem isn't between the remote and the local repo.

I have tried both

git pull origin master 

as well as

git pull

The structure is very simple it is just

Origin/Master-->Remote-->Working directory
Jeff H
  • 386
  • 1
  • 3
  • 16
  • The way that you are using the terms origin/master, remote, etc are confusing. It would be helpful to include a representative tree with branch/commit names (even if they are not the real names that you have). See this for one example of a tree: https://stackoverflow.com/questions/52192249/git-rebase-not-updating-branch/52192291 – Bill Jan 11 '19 at 17:38
  • What's the output of `git remote -v`? – jmoney Jan 11 '19 at 17:43
  • `origin` is the local name of the remote repository used to create the current repository. How many remote repositories do you use? – axiac Jan 11 '19 at 17:47
  • fork http://[IP-Address]/[username]/CatalogueGUI (fetch) fork http://[IP-Address]/[username]/CatalogueGUI (push) origin http://[IP-Address]/[username]/CatalogueGUI (fetch) origin disable (push) – Jeff H Jan 11 '19 at 17:47
  • @axiac I must be using the wrong nomenclature here. What I'm referring to as origin master is the central repo containing the production code, and what i'm referring to as remote is my personal fork of that repo. – Jeff H Jan 11 '19 at 17:49
  • It sounds like you need to update your forked repository before you `pull` in your local. This might help: https://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository – Bill Jan 11 '19 at 17:52
  • Thank you for your comments. It turns out what the problem was that when I set up the local repo, I had accidentally cloned my fork of the production repo and not the production repo itself, which is why I was able to push my local commits, but not pull new ones. – Jeff H Jan 11 '19 at 17:59

1 Answers1

0

Try deleting your local branch, and clone the project again, seems like your local git is not tracking the repo correctly

Abdul-Elah JS
  • 685
  • 1
  • 16
  • 36
  • This actually ended up working because the repo had been incorrectly cloned in the first place. – Jeff H Jan 11 '19 at 18:11