Actions

EmSys

Git - Adding a Tracking Branch

From EdWiki

Revision as of 09:31, 23 June 2015 by Jshankar (Talk | contribs) (1 revision imported: EdWiki -- Emsys pages from Shukra)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GitLab - Adding a Tracking Branch

  • Goals
    Learn how to add a local branch that tracks a remote branch.

The branches starting with remotes/origin are branches from the original repo. Notice that you don’t have a branch called greet anymore, but it knows that the original repo had a greet branch.

  • Add a local branch that tracks a remote branch.
git branch --track greet origin/greet
git branch -a
git hist --max-count=2

We can now see the greet branch in the branch list and in the log.