git branch -l code example

Example 1: create a branch command

$ git checkout -b [name_of_your_new_branch]

Example 2: git branch

git checkout -b <new-branch-name> # create a new branch
git switch <branch-name> # Switch branch

Example 3: merge git branch

1. //pull the latest changes of current development branch if any        
git pull (current development branch)

2. //switch to master branch
git checkout master 

3. //pull all the changes if any
git pull

4. //Now merge development into master    
git merge development

5. //push the master branch
git push origin master

Example 4: git branch command

git branch <branchname> 
(or)
git checkout -b <branchname>

Example 5: git branch

$ git checkout -b iss53
Switched to a new branch "iss53"

Example 6: create a branch command

$ git push origin :[name_of_your_new_branch]

Tags:

Php Example