Git Quick Tips

Overwrite local branch file with the file from remote

switch to the branch that has the unwanted file (my-file.txt).

git checkout HEAD – my-file.txt


Written on May 12, 2015