Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git warning: "Empty last update token."

What is the cause and resolution for the git warning message "Empty last update token."?

I have a repository, where every command prints this warning, e.g.

$ git status
warning: Empty last update token.
On branch foo
Your branch is up to date with 'origin/foo'.

$ git fetch
warning: Empty last update token.

$ git reset --hard
warning: Empty last update token.
Updating files: 100% (79/79), done.
HEAD is now at e1c42a2 blah

$ git prune
warning: Empty last update token.

The commands still seem to succeed. The warning message totally confuses external tools like git-extensions though, which shows "unresolved merge conflicts" when git status contains any unexpected output.

The problem only occurs with the local repository on one specific pc, but copying the .git folder to a different pc reproduces the problem.

I could delete the local copy and start fresh, but I would like to determine the cause, and perhaps even save the stashes.

like image 938
HugoRune Avatar asked Dec 17 '25 18:12

HugoRune


2 Answers

This isn't a great answer, but it got rid of the error message for me:

Check if core.fsMonitor is on:

$ git config core.fsMonitor
true

And if true, turn it off:

$ git config core.fsMonitor false

$ git config core.fsMonitor
false

Potentially more information on this thread: https://public-inbox.org/git/[email protected]/

like image 72
kaveman Avatar answered Dec 19 '25 09:12

kaveman


@kaveman is right, this is evidently the new filesystem monitoring daemon that got built into git for Windows and Mac OS in 2.37. When I enabled with core.fsMonitor = true in my .gitconfig, git 2.35.1 printed this same Empty last update token warning. After I upgraded to git 2.37, the warning disappeared.

like image 24
ryan Avatar answered Dec 19 '25 11:12

ryan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!