Table of Contents

starting a new remote branch

In the examples below, there is a shared repo (shared), a user1 (doing the branch changes), and a user2 (needs to pull the branch changes).

Method 1 may be better for you if the branch already exists locally, and you need that history pushed to the shared repo.

method 1: start a local branch and push it to the remote

method 2: push a new branch directly to the shared repo

Advanced Topics

creating a new remote branch from a branch other than master

we want to create a new remote branch called foo2 from an existing remote branch called foo

$ git push origin origin/foo:refs/heads/foo2

remove a remote branch

git push origin :old_branch_to_be_deleted