Working with Git Branches!

wardaliaqat01

Warda Liaqat

Posted on April 25, 2022

Working with Git Branches!

Git Branches are quite handy when you are working on large projects and collaborating in teams. So, I just wanted to explore and share my thoughts/findings on it.
I have had two article on basics and getting started with Git & GitHub. Have a look below:

  1. Git & GitHub - Best Version Control and Source Code hosting platforms respectively!
  2. Get your way started towards Git & GitHub!

Using GitHub we usually deal with three types of Branches:

Master Branch

Master branch is the naming convention for the main or default branch, all your code and commits will be in that branch

Image description

Feature branch

At first the code at master and feature branch will be the same but when we make updates to feature branch those changes will only be seen into feature branch.

Useful: it is useful if you are working on new features of app and you want a kind of sandbox area to work on your code, test it, make it correct and merge into main branch so, you can't affect the functionalities of main app.

Image description

Hot Fix Branch

This branching type/method is useful if you have many people working on a same repository and lots of branches going on at once. one very common thing that you will see in dev. is that let's see you will be working on this feature branch for 4 weeks or more and you have all those changes that you have made and then you find out there's this major bug that you have to fix real quick. then we made a new branch called Hot Fix Branch, you can see I made the change in one commit to fix whatever bug was wrong with the code and make sure it's working correctly and then merge back to master branch.

Image description

I hope you have found this article helpful in some way.

If you have any comments, do let me know!

Connect with me:

LinkedIn
Instagram
Twitter

💖 💪 🙅 🚩
wardaliaqat01
Warda Liaqat

Posted on April 25, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Working with Git Branches!
github Working with Git Branches!

April 25, 2022