The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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

TAGS
AUG Leaders

Atlassian Community Events