Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 5
    I wasn't looking to un-add everything, just ONE specific file.
    – oz10
    Commented Dec 9, 2009 at 22:35
  • 4
    Also helpful if you don't have any previous commits. In absence of previous commit, git reset HEAD <file> would say fatal: Failed to resolve 'HEAD' as a valid ref. Commented Jun 2, 2013 at 3:46
  • 10
    No, this adds a deletion of everything in your current directory. Very different to just unstaging changes.
    – Mark Amery
    Commented Oct 30, 2015 at 1:33