Command

Git Push New Branch Command

The Git command to push new branch is git push -u origin <branch>.

Quick Answer

Command
git push -u origin <branch>
GitCommand

Push New Branch

Type this command
git push -u origin <branch>

Pushes a new branch and sets it to track the remote.

Learn More

How to push new branch in Git

  1. Open the terminal or command interface for Git.
  2. Type git push -u origin <branch>, replace any placeholders, and run it.

Git Push New Branch Command

Run git push -u origin <branch>.

Related Commands

Frequently asked questions

What is the Git command to push new branch?

Run git push -u origin <branch>.

Where do I type this Git command?

Type it in the terminal or command-line interface used by Git.

Does this Git command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify