How to work with GIT branches?

Multiple development branches can be kept in a single Git repository. 

To create a new branch, type the following command, replacing name with the name of the new branch:

git branch name

To see a list of all branches in a repository, type the following command:

git branch

The asterisk (*) next to a branch name indicates the current working branch. If you want to work on another branch, type the following command, replacing 'name' with the name of the branch:

git checkout name

Using the git commit command, you can make modifications to the branch and commit them. If you switch to a different branch, you will not see those updates.
 
Was this answer helpful?

Related Articles

How to make changes in repository?

Git makes it simple to update a repository. Using the git add command, you can update Git's file...

How to create a repository in GIT?

To build a Git repository, simply log in to your Hostginger hosting account through SSH and enter...

What is GIT?

All Hostginger Hosting Wordpress and Cloud accounts include the popular Git version control...

How to merge changes from one branch to another branch?

Type the following command to merge modifications from one branch into another. Replace name with...

How to clone a repository?

It is possible to "clone" repositories. Git creates an exact replica of an existing repository...