I have a branch that I want to merge to the remote, most up-to-date master
. I have a local, outdated master on my computer.
I ran git pull upstream master
, and it retrieved the remote master
, and that was great, exactly what I wanted. Then, without thinking, i accidentally discarded the changes while switching to another branch.
While on my local master, I have run git pull
, and git pull upstream master
many times now, and it always says "Already up to date." when it clearly isn't. At first git pull upstream master
worked just fine, but now it doesn't, and the machine thinks it is up to date when it isn't. How can I make my local master the same as the remote one again?
git pull
does two things: 1.fetch
the remote and 2.merge
it to your local branch. Checking out another branch and then going back tomaster
should not change anything on master. Can you reproduce the steps in a mock repo and post the commands?