[Fixed]-Git local master branch displays differently to live version, even though it's up-to-date

1👍

Correct me if I am wrong, but I am assuming that when you say “live version”, you are talking about the project on a server.

Once your merged your changes onto the local master branch from your local git branch (i.e git merge your_local_random_git_branch), these changes need to be pushed to your server not the other way around.

The reason why it shows

Already up to date.

after doing git pull origin master, is because the remote repository is behind the local master branch so there is nothing to change on the local master branch. What you want to do is to push your changes from the local master branch like this:

git push origin master

0👍

If the problem is from git then try:

git reset --hard origin/master

This will make sure your remote is the exact same as origin.
If your code is fine then restart your local server and/or empty your browser cache.

👤Seif

0👍

First please check if local master branch is accordant with origin/master, use git checkout master and git log origin/master..HEAD

  1. If there has output, so you should reset local master to origin/master, just as Saksow said git reset --hard origin/master.
  2. If there is no output, that means, there is no issue for git doing version control, you need to check Django, maybe caused by some settings or something (since I’m not familiar with Django)

Leave a comment