Is it possible to completely revert git repository to previous X revision on bitbucket so that it doesn't keep any changes after that X revision and doesn't contain any source code change newer than X revision.
For example if there are 1,2,3,4,5 revisions in the repo and i want to revert to revision 3, so that it's the last revision and completely wipe out any trace of revisions 4 and 5 as if they never were made and can't be retrieved.
Yes, you can do this there many ways to do this:
1) you can specify the time like 10.minutes.ago, 1.hours.ago, 1.days.ago ...
Ex: if you want to go back 5 days ago on the master branch
git reset --hard master@{5.days.ago}
2) if you know the commit hash then you can go back to it directly git reset --hard <commit_hash>
Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With