git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: 'git pull' fails with 'not uptodate' message despite 'git reset --hard'

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jul 29, 2009, 20:44 UTC
Message-ID
<32541b130907291344u3c2b7df8ld848a79ec38197a6@mail.gmail.com>
In-Reply-To
<20090729203637.GF22281@clouds>
On Wed, Jul 29, 2009 at 8:36 PM, Jody McIntyre<scjody@sun.com> wrote:
Show 14 quoted lines
> On Tue, Jul 28, 2009 at 08:19:54PM -0400, Avery Pennarun wrote:
>> Usually a 'git status' will fix it.  In any case, if it doesn't,
>> please send the output of 'git status' :)
>
> This is again a bit strange:
>
> $ git status
> # On branch master
> # Your branch is behind 'origin/master' by 484 commits, and can be fast-forwarded.
> #
> nothing to commit (working directory clean)
> $ git status CREDITS > /tmp/git_status.txt
> $ wc -l /tmp/git_status.txt
> 26063 /tmp/git_status.txt

Okay, that's extra strange: when I've had this problem, 'git status' has fixed it right away; it just goes away after that. It might be that recent changes to git have added an "optimization" that makes this not happen for some reason.

You can always try the thermonuclear option:
   mv .git/index .git/index.bak
   git reset HEAD    # note, don't use --hard here
   git status   # should show only files you have *really* changed
Of course, if this fixes it than it's *definitely* a bug somewhere.
Good luck.
Avery
Previous: Jody McIntyreNext: Jody McIntyre
Message 4 of 6 in “'git pull' fails with 'not uptodate' message despite 'git reset --hard'”
  1. Jody McIntyreJul 28, 2009
  2. Avery PennarunJul 29, 2009
  3. Jody McIntyreJul 29, 2009
  4. Avery PennarunJul 29, 2009
  5. Jody McIntyreJul 29, 2009
  6. Jody McIntyreJul 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.