How to rollback to a previous commit in Jenkins?

I have a previous commit sha. How do I roll back to a previous commit in Jenkins?

I have a main project with submodules.

  • Why do we need to git push first before git pull?
  • Advice on using GitHub
  • How to remove a file from the index in git?
  • How can I delete a git branch after using `git merge --squash`
  • What is the default behaviour of “Resolve using theirs” in git
  • Pull live code from heroku
  • I’m thinking I can pass in the previous commit sha to the build parametrized field. Also, I have submodules, how do I rollback the submodules to the previous commit using the main project commit sha?

  • How to REALLY remove a tag on git / SourceTree
  • List all commits in a topic branch
  • Still have conflicts but git says “No files need merging”
  • Git reset behavior
  • Can SourceTree show diff side-by-side
  • Git SSH “Permission denied” between two servers
  • One Solution collect form web for “How to rollback to a previous commit in Jenkins?”

    how do I rollback the submodules to the previous commit using the main project commit sha?

    You don’t: submodules are, by their nature, fixed SHA1 recorded as gitlink, special entries in the index of the main repo.

    If you set the main repo to a previous SHA1, it will have with it the SHA1 that were recorded for the submodules.

    Git Baby is a git and github fan, let's start git clone.