Home > Software engineering >  Git pull shows "already up to date" but they're wrong
Git pull shows "already up to date" but they're wrong

Time:08-30

DISCLAIMER : There's already default branch is wrong

Instead of having main or origin/main as my default branch, for some reason (some command I may have accidentally performed), the F02 became the default branch. And I must have created F02 from origin/main. So I suppose @Nikhil was probably right.

Which was very weird because when performing a git branch I could only see the following (and no F02 available) :

git branch no F02

Solution I've found: I've locally merged local/F01 -> local/main and right after that I tried to git reset --hard to remove all the commits I had just added.

As a result : when doing git diff main..origin/main, now it worked! ✅ I could see the changes on origin/main that were not on local/main :)

So I went back to my post to update my post and share my investigation and solution and found your two posts @larsks and @Nikhil.

@Nikhil : sadly I saw your post only after but I bet it would have made it worked cause it looks like the HEAD was detached from main or origin/main

@larsks : I had already performed your command and indeed : F01 did show changes ✅ but main/origin did not show any new commits

  • Related