Ladies and Gentlemen,

I'm running git on Ubuntu 12.04.1 LTS

I got bitten by what follows. Yes, it's an edge case. Yes I now understand
why it does what it does. Yes the right answer is "Don't do that, Jeff." :-)

Still, it took me a little time to figure out what I'd done wrong because
the failure is silent, so I thought I'd document it. Perhaps there's even
some way to issue an error message for cases like this.

The attached test script shows the issue in detail, but here's the basic

$ ls
$ git clone hello # *Mistake!* Succeeds, but should have cloned "hello.git"
or into something else.
$ cd hello; touch foo; git add foo; git commit -am"add a new file"
$ git status # says I'm a rev ahead of the origin
$ git push # nothing pushed
$ git status # says everything's okay

At this point hello/foo still exists, there's nothing to commit, git diff
origin/master reports nothing, yet foo was never pushed to hello.git.


Jeffrey Haemer <>
720-837-8908 [cell], [blog], [vlog]
פרייהייט? דאס איז יאַנג דינען וואָרט.

Description: Bourne shell script

Reply via email to