Git is already updated if I reset

I have a cloned repo that I use for a live site and I get it from a bare repo. For some reason, every time I do a "git pull", I get an already updated message. But it is not updated and not updated. If I do git reset --hard HEAD ^ and then git pull again, the changes come in.

What is the problem and how to fix it to pull git pull and merge changes without requiring a hard reset?

+4
source share
1 answer

This will be the case if you are working on a DETACHED HEAD (see this SO question for more)

gitk detached head

This happens when you directly check the link to SHA1, for example.

+3
source

Source: https://habr.com/ru/post/1307758/


All Articles