Git - Push


push will send branch to the remote creating remote branch


git push <remote> <branch>

# or
git push origin localBranchName:remoteBranchName

Git automatically expands the branchName out to refs/heads/branchName:refs/heads/branchName, which means:

  • Take my branchName local branch and push it to update the remote’s branchName branch.”


Push a local branch to a remote, creating also the remote branch

git push -u origin stable


  • origin is the name of a remote
  • stable is the name of a branch
  • -u set the remote branch as a tracking branch


* [new branch]      stable -> stable
Branch 'stable' set up to track remote branch 'stable' from 'origin'.

Discover More

is a content-addressable file system used to track directory tree content (as defined by its creator Linux Torvald) It's not a version control...
Git - Getting Started

An article that takes the basic steps in order to set up a Git repository When you want to set up a repository, you face generally two options: you want to create a fresh install from a Git repository...
Git - Local branch

A local branch is a branch that exists only on your computer. tracking branch There are two types of local branches: non-tracking local branches. They are not associated with any other branch....
Git - Remote (Tracked Repository)

A remote in Git is a remote repository (ie a remote git server). Git remote manage the set of repositories (“remotes”) whose branches you track. They are also called tracked repositories in reference...
Git - Remote branch

A remote branch is a branch in a remote repository. (remote reference). Example: where: and To get the commit from a remote branch, you do a pull (ie a git fetch followed by git...
Git - Upstream Branch (Tracking branch)

An upstream is a configuration of a local branch that set the remote branch that it's tracking. cloning @{u} or @{upstream} means the upstream branch of the current branch @{upstream} or @{u}...

App hosting on with dynos where: An application is a collection of source code written in one language. A dyno is a lightweight Linux container that...
Branches Git
Git - Branch

This page talks Branch management in Git. For Git, a branch is: a commit name (ref) that points to the last commit (head) leaf in the commit log (or log) that represents a commit chain Example...

Share this page:
Follow us:
Task Runner