Forums

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

How do I use pipelines to revert to a previous commit

burglar1971
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!
August 6, 2018

I am using pipelines to manage our production server repos and I pushed up some changes and I need to revert back to the previous commit.  If I simply reset my local repo to the commit I want to be the head and push the changes up and trigger the pipeline, will the files on the production server be reverted back to what they were before the final push?

1 answer

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2018

Hi Don,

 

If you run:

$ git revert <commit>

locally, and then push that change to Bitbucket, you should have the previous code in production again. Pipelines will be triggered whenever you push commits to Bitbucket (assuming your configuration allows it).

More information here if you're interested: https://www.atlassian.com/git/tutorials/learn-undoing-changes-with-bitbucket

Thanks,

Phil

Monin Digital
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 3, 2019

Is there an example pipeline YAML that catches the pipeline errors and reverts the branch to previous state?

Like Ed Bateman likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events