News for hackers. Stuff that matters.
Re:Legit. Git for humans by djacobs on Sunday March 25, 2012 @09:01PM (#3754443)

  It's surprisingly hard to unstage a file.
Is there a case when it's not a simple git reset my-file away?
Re:Legit. Git for humans by tspiteri on Monday March 26, 2012 @05:46AM (#3755859)
Yes there is. When you have a new repository without any commits, there is no HEAD, so you can't unstage by resetting.

    mkdir try
    cd try
    git init
    touch file
    git add file
    git status
Still, the git status command shows you what you need to do to unstage.
Re:Legit. Git for humans by ajross on Sunday March 25, 2012 @11:40PM (#3754880)
Indeed no. That's exactly what git reset does: "copy entries from <commit> to the index". I got that from the unusably bad man page. It was the first sentence.
Re:Legit. Git for humans by djacobs on Monday March 26, 2012 @02:35AM (#3755373)
My question was a rhetorical one :)
Re:Legit. Git for humans by ajross on Monday March 26, 2012 @12:03PM (#3757263)
I know. But you were needlessly agreeable. I thought some salt needed to be rubbed into the GP post.
Re:Legit. Git for humans by _ikke_ on Monday March 26, 2012 @05:25AM (#3755798)
And in every git status message.
Re:Legit. Git for humans by phillmv on Monday March 26, 2012 @11:49AM (#3757215)
I forget my exact edge case. Something to do with wanting to unstage a folder, or unstaging a folder while wanting to preserve work in some of the files.