Git Tips - 2

Making the Current HEAD the Head of an Existing Branch If you want to make the current HEAD the head of an existing branch, you’ll need to force update that branch to point to the current commit:

Switch to the Target Branch:

git checkout <target-branch>

Replace with the name of the branch you want to update.

Reset the Branch to the Current HEAD:

git reset --hard HEAD

This command will move the HEAD of the to the current commit.