Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git pull says local master branch is up-to-date with origin master branch; it isn't

Tags:

git

github

I'm trying to get my local master branch to resemble origin/master. In my local develop branch I deleted c.py and d.py, which I then pushed to origin/develop and merged into origin/master. I then ran git checkout master and git pull origin master and now I'm getting an "Everything up to date" message.

Current file discrepancies are as follows:

Local Master

 root_directory/
    index.py
    classes/
        __init__.py
        a.py
        b.py
        c.py
        d.py

Origin/master

 root_directory/
    index.py
    classes/
        __init__.py
        a.py
        b.py

When I run git pull origin master I get the following message:

From https://github.com/username/repo
* branch            master     -> FETCH_HEAD
Already up-to-date.

One answer to another SO question I found recommended using git pull --rebase. This is the the message I get from that:

Current branch master is up to date.

And finally, when I run git status I receive:

On branch master
Your branch is up-to-date with 'origin/master'
nothing to commit, working directory clean

What am I doing wrong here? What can I do to make my local master branch actually resemble origin/master?

like image 619
Christopher Byrd Avatar asked Dec 12 '25 14:12

Christopher Byrd


1 Answers

How have you merged origin/develop with origin/master, using GUI, pull request then merge? If not then, you can merge locally then push to remote.

$ git checkout develop                # checkout develop 
$ git push origin develop             # push changes to remote develop

$ git checkout master                 # checkout master
$ git pull origin master              # sync with origin/master
$ git pull origin develop             # merge develop into master
$ git push origin master              # push master to remote 
like image 60
Sajib Khan Avatar answered Dec 15 '25 05:12

Sajib Khan