Recently I deleted some files from my profile Java projects via web interface.
I couldn’t find any way to restore them back?
I would be apprecciate for any advice.
You can revert the commit where you deleted the file in the commit details page.
On the right of the Browse files button, hopefully there is another button marked Options and the revert option will be on the drop-down there.
If you don’t have that button, it looks like you are on your default branch (
master) which is probably protected. You will need to go to Settings → Repository → Protected branches to change that. If you do so, make sure you add the protection back in.
Really, it would be better to work in merge requests on feature branches, so that you don’t ever have to un-protect
Sorry, there really no other button
And I also cannot find Protected Branches:
Yes, I just beginner of the system.
Ah, I see you are using GitHub, and this forum is for users of GitLab. You probably want to try the GitHub forum. Best of luck!
Anyway, thanks for help!
Hi there, I have a repo on GitLab about dragon city mod which is an android game mod that I am developing for a couple of months. I have accidentally committed too many wrong codes in my repo. How far I can go to reverse my commits?