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

"git push" silently fails, says 'Everything up-to-date" when it's not.

From
David Woodhouse <dwmw2@infradead.org>
Date
May 28, 2012, 11:53 UTC
Message-ID
<1338206011.11518.115.camel@shinybook.infradead.org>

I *thought* I'd pushed everything from my tree out to the server a couple of weeks ago, and 'git push' appears to confirm that:

[dwmw2@shinybook mtd-2.6]$ git push Everything up-to-date

But it lies. Only when I try to *pull* does it give me a hint:

[dwmw2@shinybook mtd-2.6]$ git pull You are not currently on a branch, so I cannot use any 'branch.<branchname>.merge' in your configuration file. Please specify which branch you want to merge with on the command line and try again (e.g. 'git pull <repository> <refspec>'). See git-pull(1) for details.

So I've been happily thinking that my commits were actually in linux-next for the last couple of weeks when they weren't. OK, I could have checked in gitweb — silly me for trusting the tools.

Why would it do this evil thing and start lying to me? When it told me 'Everything up-to-date', precisely *what* was it telling me was up to date? Did it ever push *anything*, *anywhere*, or was it just a complete fabrication?

I don't quite know how I ended up "not currently on a branch" either. I almost never use branches locally and my local tree has *never* been changed to another branch; I always use separate trees instead of branches. I may have committed a few things, then reverted them with 'git reset HEAD^^^^' and re-committed them with some changes. But that shouldn't cause this, surely?

When I have a clone a remote tree, and I run 'git push', surely my HEAD should be pushed to the HEAD of the remote tree? There's little excuse for *telling* me it's up-to-date, when it's not!

I understand that some people like the branch facility even though I find it mostly pointless, but I'd prefer that it didn't undermine basic usability of git :(

-- 
dwmw2
Next: Matthieu Moy
Message 1 of 3 in “"git push" silently fails, says 'Everything up-to-date" when it's not.”
  1. David WoodhouseMay 28, 2012
  2. Matthieu MoyMay 28, 2012
  3. Junio C HamanoMay 29, 2012

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.