When working with git, you will frequently need to create working branches to put your changes on. Here's a quick guide to get you started.

For our 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 your local branch to remote:

-u will set your branch to track the remote. Just make sure your git config push.default value is set to upstream.

  
  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