Restore file from git repo

Answered

I have a file that I messed up and not sure how to revert the changes back from the original git repo.  I have tried everything and not sure how to do this on PyCharm.  I ended up backing the files I needed, then deleting the project and starting from a clean pull of the repo.  I would like to figure out how to overwrite the local copy with the remote preferably on a file by file basis.  Since I am sure I will probably need this feature again. Is this possible?  If so how can I do this with PyCharm.  I know I can do this through the command line, but when I tried it it overwrote everything and delete the .idea and other directories used by JetBrains and that really messed me up.

0
1 comment

Hello Mrjoli021

Could you please clarify what exactly was wrong with a file?
If you've made a commit and you would like to reset your history to a parituclar commit, then you can right-click on desired commit and choose "Reset current branch to here" and choose what kind of reset to perfrom. Please see:
https://www.jetbrains.com/help/idea/undo-changes.html#reset-HEAD

0

Please sign in to leave a comment.