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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: smime.p7s>>


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]