Why do we create branches in GIT?

If we are simultaneously working on multiple tasks, projects, defects or features, we need multiple branches. In GIT we can create a separate branch for each separate purpose.

Let say we are working on a feature, we create a feature branch for that. In between we get a defect to work on then we create another branch for defect and work on it. Once the defect work is done, we merge that branch and come back to work on feature branch again.

So working on multiple tasks is the main reason for using multiple branches.

Read the full book at www.amazon.com
Posted in GIT, GIT Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *

*