> > As I make changes to my files, I have been adding them to git repo
> > but haven't been committing them.
> > Today, due to an incorrect switch to the tool, I ended up overwriting
> > a file I was working on.
> > This file was added in repo today. Is there a way to recover that
> > file?
> git checkout -- path/to/the/file
> will grab the contents of the file "path/to/the/file" as recorded in
> the index and create/overwrite it in the work tree with that contents.
> Should you run something like
> git checkout HEAD path/to/the/file
> then the contents would be taken from the tip commit (HEAD) instead of
> the index.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.