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

Check out master

PreviousCommit a changeNextCreate a hotfix

Last updated 2 years ago

Check out master branch to fix a bug

Now you get the call that there is an issue with the website, and you need to fix it immediately. With Git, you don’t have to deploy your fix along with the iss53 changes you’ve made, and you don’t have to put a lot of effort into reverting those changes before you can work on applying your fix to what is in production.

All you have to do is switch back to your master branch!

git checkout master

However, before you do that, note that if your working directory or staging area has uncommitted changes that conflict with the branch you’re checking out, Git won’t let you switch branches!

At this point, your project working directory is exactly the way it was before you started working on issue #53, and you can concentrate on your hotfix

👍