Overwrite a local file with the content it has in the source repository

0

I want to get the contents of the source of a file to write about my local changes. How can I do it from the git console?

    
asked by AndreFontaine 26.12.2016 в 16:36
source

2 answers

3

I imagine you want to overwrite your changes because of some error or something, if you did not do commit there is still hope xD. It makes a

git checkout tu_branch la_ruta_de_tu_archivo

If you want to download the file as it is from your repository, do a

git pull origin tu_branch
    
answered by 26.12.2016 / 16:41
source
0

This worked for me. I just have the master branch.

git checkout la_ruta_de_tu_archivo
    
answered by 02.08.2018 в 19:19