Merge Hotfix

Merge Hotfix

Finally, merge the hotfix branch back into your master branch to deploy to production. You do this with the git merge command:

git checkout master
git merge hotfix

You’ll notice the phrase “fast-forward” in that merge. Because the commit C4 pointed to by the branch hotfix you merged in was directly ahead of the commit C2 you’re on, Git simply moves the pointer forward. Your change is now in the snapshot of the commit pointed to by the master branch, and you can deploy the fix.

master is fast-forwarded to hotfix

After your super-important fix is deployed, you’re ready to switch back to the work you were doing before you were interrupted.

Last updated