1.

Create Remote Branches

Answer»

Git doesn’t allow creating a new and isolated branch on a remote repository. But, you to make a branch remote, we can push an existing local branch.

The steps to create a remote branch is as follows:

  • Create a local branch and switch to that branch:
git checkout -b <branch_name>
  • Push in the local branch:
git push -u origin <branch_name>

Note: origin is the default name of remote

Now, if someone wants to fetch some information, one can simply run:

git fetch git checkout <branch_name>


Discussion

No Comment Found