I realized that our branch dev is not very stable and reverted some changes to work on debugging them.
git checkout dev
git checkout -b staged_dev
git push origin staged_dev
# go back to dev
git checkout dev
git reset 230086bf429307182ed9b35e19ad2581a3a2baf6 # last known stable state of dev
git reset --soft HEAD@{1}
git commit -m "Revert to 230086bf429307182ed9b35e19ad2581a3a2baf6" # this commit SHA = 270329c
git reset --hard
git push origin dev
This added a new commit on top of dev : 270329c
Since then another person has added some safe commits to dev and I have debugged staged_dev and added some commits. How do I undo 270329c
from dev and add the other commits of staged_dev into dev ?
reference stackoverflow question : Revert to a commit by a SHA hash in Git?