When working with git, you will frequently need to create working branches to put your changes on. Here's a quick git guide to help you create a local branch, push your local branch to a remote and delete your local or remote branch.

For the code examples, we'll follow the user/id/task pattern and use "u/mrathee/contact-form-fix" as the branch name.

To create your branch:

Make sure your current branch is up to date before you create your branch.

  
  git pull --rebase
  
  
  git checkout -b u/mrathee/contact-form-fix
  

Rather than running git branch then git checkout, you can pass "-b" to checkout combine the steps.

To push a local git branch to remote:

The "-u" argument will set your branch to track the remote. Just make sure your .

  
  git push -u origin u/mrathee/contact-form-fix
  

To delete a local branch:

  
    git branch -d u/mrathee/contact-form-fix
  

To delete a remote branch:

  
    git push origin --delete u/mrathee/contact-form-fix
  
More reading related to git: