Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Need to revert master branch to yesterdays state

Manikanta_A May 8, 2023

Hi Team,

 

Looks like our master branch got corrupted yesterday so we need to move branch to yesterdays state.

Need your help asap , Since it is impacting our production release.

 

Thanks,

Manikanta A

PH: +91 90597788808

2 answers

0 votes
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 8, 2023

Hi Manikanta,

I feel your pain, having a corrupted master branch is no fun.

I assume the master branch is already shared via Bitbucket, or to speak in git terms, the corrupting changes are already pushed to the remote master branch?

In that case it is best to use `git revert HEAD~1..HEAD` to create a new commit that reverts the corrupting one. If you have more than one commit (for example 3) to roll back you can use `git revert HEAD~3..HEAD`. Git will one by one create new commits that revert the corrupt ones.

You can push the master branch without any problems to Bitbucket (remote) as you essentially created new commits.

Hope that helps, let me know how you go.

Best, Ulrich

// Izymes - Tools for efficient Devops teams.

0 votes
Manikanta_A May 8, 2023

This has to fixed asap. Can some one look at this issue

Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 8, 2023

Please have a look at my suggestion above. You can fix this easily by using git revert. Cheers, Ulrich // Izymes

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events