Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to revert on previous push code?

Zaffar Ali
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 12, 2019

I copied my project and make a new folder, I delete some files from copied folder and push agian it on bitbucket, but its change my oringinal folder code and update the code on bitbucket, now how I revert my previous code on bitbucket?  

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2019

Hi Zaffar, welcome to the Community!

This is more of a Git question, rather than a Bitbucket question. If you want to revert the last commit you can just do

git revert <unwanted commit hash>

then you can push this new commit, which undid your previous commit. To fix the detached head do

git checkout <current branch>

If you want to go further in time, you can follow several tutorials online like for example this  or this one.

Hope that helps!

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events