Wednesday, July 31, 2013

Overwriting local changes with Git

Often I want to delete a file and pull the original back from my git repository. To do this properly you have to checkout the file from the "HEAD" tag.

$ git checkout HEAD <optional file name>
$ git checkout .

No comments:

Post a Comment