Push branches to Git

branch, git, git-pull, git-push, github

Solution

git push origin <local-branch-name>:<remote-branch-name>

Substitute for `<local-branch-name>` and `<remote-branch-name>`. They may be same or different, as you wish.

Problem

I have a local repository I'm working on and its remote is hosted on GitHub. I recently created a branch and started working on it, making several commits and now wish to push the branch to GitHub and be able to pull it to another cloned repository. How do I do this?

Original source

Related problems