How to Revert to a Previous Commit for Deployment While Keeping New Commits for Debugging?

Hello everyone,

We’re facing an issue with our application in production. Here’s the situation:

  1. Commit A: This is the past commit where the application was running fine in production.
  2. Current Situation: After months of pushing code, the application in production is no longer working as expected.
  3. Branch Setup: We have two branches: dev and prod.
  • dev is where we push our development work.
  • prod is the branch used for production deployments.

What I Want to Achieve:

  • Deploy the state of the application from Commit A on the prod branch, as it is the last known working state for production

Question:

How can I revert the production deployment on the prod branch to Commit A while keeping the new commit (for troubleshooting)

I hope you understand my question