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

1 Answer 1

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.