git-terminology-branching

Git Terminologies – Branch

Here we will see basic commands and git terminologies overview that you need to start using git. The terms are same irrespective of which Git platforms github.com or Azure Repos , or Gitlab , bitbucket.org and various others you refer to .

Git branch

Git Branch

A branch is a pointer to the  snapshot or a independent copy of the working code  of the repository. A new branch is generally created for a new feature a, a bug fix.As we see later in the course, it is a best practice to create a new branch for every change your team is working on.

View the video below to understand the branch command in detail

As you can see here, i have a copy of the code called ‘Sprint 1’, now i can go ahead and create two new branches Feature 1 and Feature 2 , remember these two branches i have created on the server .

Now, a developer working on Feature 1 can clone the branch and start making changes.

Next the developer can create two new local branches APIChanges and UICHanges, remember these are local branches.

Developer can now do all API related changes independent of UI changes and without affecting other developers work.

Command Overview
git branch <Name>
Mandatory Parameters
ParameterDescription
<Name>name of the branch to create from current branch
Optional Parameters
ParameterDescription
–set-upstreamspecify the server branch details to link local branch with server branch
-dto delete a branch
start-pointNew branch will point to this commit id

Next, we learn about checkout