0

I have a couple of branches (master, escaped), now, branch escaped has some commits that branch master doesn't have. What I want to do is to have branch master point at those commits on branch escaped without necessarily moving those commits to master. So far solutions I have seen are about moving those commits to branch master, which is not what am trying to accomplish, again I want branch master to point at commits from branch escaped. Thank you.

  • 2
    Does this answer your question? [How do I make a branch point at a specific commit?](https://stackoverflow.com/questions/7310177/how-do-i-make-a-branch-point-at-a-specific-commit) – snipsnipsnip Feb 26 '20 at 09:30
  • Can you add a schema of your current situation and one with the expected goal? – Romain Valeri Feb 26 '20 at 09:30

1 Answers1

1

First you need to know git is all about pointers in a directed acyclic graph. A branch is just a pointer to a specific location (commit) in your repository. So if you want to move the master branch to the exact same commit as escaped, just move the master branch:

git checkout master
git reset escaped