git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: git@vger.kernel.org
Subject: "git push" silently fails, says 'Everything up-to-date" when it's not.
Date: Mon, 28 May 2012 12:53:31 +0100	[thread overview]
Message-ID: <1338206011.11518.115.camel@shinybook.infradead.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]

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

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6171 bytes --]

             reply	other threads:[~2012-05-28 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-28 11:53 David Woodhouse [this message]
2012-05-28 12:11 ` "git push" silently fails, says 'Everything up-to-date" when it's not Matthieu Moy
2012-05-29 18:53   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1338206011.11518.115.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).