Creating a Branch
Learn how to create a branch in Git.
We'll cover the following
Creating a Git repository
You will create a Git repository with a single file. This file will have separate changes made on two branches: master
and newfeature
.
Type the following command to create a simple Git repository:
1 mkdir lgthw_git_branch_1
2 cd lgthw_git_branch_1
3 git init
4 echo newfile > file1
5 git add file1
6 git commit -m 'new file1'
7 git status