L H
L H

Reputation: 1295

Git pull does not update local repo (from GitLab)

While trying to pull from a remote GitLab repository I am getting:

$ git pull origin master
From ######
 * branch            master     -> FETCH_HEAD
Already up to date.

But checking the local and the remote repos there is clearly a difference. Why would this be happening and how could I update to local repo to represent what is on the remote repo?

Additional Info, if I do git status, I get the following:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   ######.py

no changes added to commit (use "git add" and/or "git commit -a")

And doing git diff shows me a long list of differences.

Upvotes: 1

Views: 1027

Answers (1)

Neophear
Neophear

Reputation: 542

The modified file is not tracked in your local repo. You need to git add ######.py just as the message output says.

More info can be found here git add

Upvotes: 1

Related Questions