Version Control
Git: Moving ahead
Git: Moving ahead
  • Group 1
    • Resolving Merge Conflict
      • Create master
      • Create a branch
      • Merge them
  • Group 2
    • Branching Demo
      • Create issue53 branch
      • Commit a change
      • Check out master
      • Create a hotfix
      • Merge Hotfix
      • Delete the hotfix
      • Switch back to issue 53
  • Group 3
    • Adding Collaborators
      • Send invite
      • Accept Invite
Powered by GitBook
On this page
  1. Group 2
  2. Branching Demo

Merge Hotfix

PreviousCreate a hotfixNextDelete the hotfix

Last updated 2 years ago

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.