Friends, good afternoon.
I removed some files inside the server, however I need them again, I have them in the git repository.
How do I redownload the repository files?
Friends, good afternoon.
I removed some files inside the server, however I need them again, I have them in the git repository.
How do I redownload the repository files?
You just need to revert the commit you used to delete the files.
git revert <commit>
Where <commit>
is the number of the commit you want to undo.
I think I would use this command:
git reset --hard HEAD
Use $ git checkout chave
where the keyword is the branch number in a phase where your files existed.
Ex: $ git checkout bc39326028de55653c8245cb7077b44023239735
At this point you will see your files back. Copy these files out of your GIT-controlled folder and go back to your previous version.
Use $ git checkout aChaveInicial
again.
Pass the files you copied out of the directory to the desired location.
Make a $ git add .
and then $ git commit -m "arquivos de volta"
.
Ready, your files are back and with the latest version of your project.
In order to better visualize dates and keys use $gitk