[Http-crcsync] Repo not broken after all :-) (Re: I accidentally broke the repo, please help me fix it)
Martin Langhoff
martin.langhoff at gmail.com
Mon Apr 27 13:53:19 EDT 2009
On Mon, Apr 27, 2009 at 7:45 PM, Alex Wulms <alex.wulms at scarlet.be> wrote:
> I had commited (locally) one file too much. I wanted to undo that commit
> before pushing everything upstream. I used the command
> git reset HEAD <filename>
>
> But that resetted too much and my local status became confused. I could no
Yeah, I've fallen into that trap too. git reset wants to reset the
whole tree, not one file. To "reset" one file, you can do
git checkout HEAD -- <filename>
or replace HEAD with any commit you want.
> I had a similar issue a while ago. Git does give me a big headache when I make
> a small mistake. I still have much to learn in that area.
nothing too serious -- no data is lost. I don't tihnk you can actually
lose data with git. :-)
cheers,
m
--
martin.langhoff at gmail.com
martin at laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff
More information about the Http-crcsync
mailing list