Sometimes, you might need to revert to a previous version of your code if a new update causes problems or bugs. With atomic deployment, this is very easy to do.
All you need to do is to run the following command in your local git repository:
git reset --hard HEAD~1
This will undo the last commit, and reset your local code to the previous state. Then, you need to push the commit to the main branch of your remote repository:
git push
This will overwrite the remote branch with your local code. Since you have set up a webhook with RunCloud, this will trigger an Atomic deployment automatically. RunCloud will create a new release folder with the previous version of your code, install the dependencies, and activate it as the current one.
That’s it! You have successfully reverted to a previous version of your code using Atomic deployment.