Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to restore a file from another git repo

I have a project uploaded to the server and I deleted one of the project files by mistake, now the project is connected to the git and I want to restore the file that I deleted from the copy of the project on the local, what do I do?

I tried to make "git pull", but I got "Already up to date."

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If you have not staged the deletion yet, simply run git restore <filename> and the file will be restored from the index.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading