git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug] git-status shows bad instructions prior to first commit
@ 2008-02-12  0:59 Rhodes, Kate
  2008-02-12  3:13 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Rhodes, Kate @ 2008-02-12  0:59 UTC (permalink / raw)
  To: git

git-status incorrectly reports that you should

# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#


when working on the Initial commit.

To reproduce
mkdir foo
cd foo
touch a.txt
git init
git add a.txt
git status


The problem is, obviously, that calling
git reset HEAD a.txt
will result in
fatal: Failed to resolve 'HEAD' as a valid ref.

Why this is important:
New users are Going to accidentally add files they didn't mean to in  
their first trials with Git. Providing instructions guaranteed to  
error when people are just getting started with it will give git a bad  
image and hurt adoption. Also,  just about every time I've added a  
sizable project to a new version control system I've accidentally  
added a file before the first commit, usually something that should be  
added to the ignore file, but still, I think this isn't some random  
isolated problem that people never encounter.

While we're at it, can someone please explain to me how to remove a  
file from the index prior to the first commit? I'm stumped.

-masukomi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-13 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12  0:59 [Bug] git-status shows bad instructions prior to first commit Rhodes, Kate
2008-02-12  3:13 ` Junio C Hamano
2008-02-12  5:45   ` Jeff King
2008-02-13 22:02     ` Junio C Hamano

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).