Creating a New Branch
Last updated
Last updated
See https://git-extensions-documentation.readthedocs.io/en/latest/branches.html#create-branch
Command line
Most of time we'd like to create our branch basing on the remote branch for example origin/master
, instead of a local master
. A local master
branch is only needed when we want to push something directly to the remote master
. If commits are meant to be merged through pull requests, we can delete it to avoid inadvertently push to the remote master
branch.
Most of time we'd like to fetch the remote branch first before creating branch, because the origin/master
on our PC might not be up to date as the branch on remote server.
In the left branch tree panel, find the remote branch, right click and select the menu Fetch & Checkout
if want to use the same name as the local branch name or Fetch & Create Branch
if a different name needed.