0

what I am trying to do in my git repo is reverting the master branch from its latest commit to a previous one back in time. Let's say that my master branch history looks like this:

CommitA
||
CommitB
||
CommitC
||
CommitD
||
CommitE
||
CommitF
||
LatestCommit

what I am trying to do is bring my master branch from LatestCommit to CommitB . I don't want to revert commit after commit since there are quite many in between.
What I tried was branching out from CommitB to a separate branch (let's call it BranchCommitB), pushing my new branch and then creating a pull request to merge it into master. Problem is that Azure Devops doesn't see any file change, even though if I go in the Master branch and in the BranchCommitB branch the files are different.

Tarta
  • 1,729
  • 1
  • 29
  • 63
  • 1
    It's a bit unclear whether you want to create a new commit after LatestCommit that has the same contents as CommitB, or you want CommitB to become the latest commit and discard all newer commits. – mkrieger1 Nov 23 '21 at 23:40
  • 1
    (Fortunately, the duplicate answers both.) – torek Nov 24 '21 at 02:19

0 Answers0