Skip to Content
Git: Mastering Version Control
book

Git: Mastering Version Control

by Ferdinando Santacroce, Aske Olsson, Rasmus Voss, Jakub Narębski
October 2016
Beginner
861 pages
20h 37m
English
Packt Publishing
Content preview from Git: Mastering Version Control

Branches with remotes

At some point, it is very likely that you have cloned somebody's repository. This means you have an associated remote. The remote is usually called origin because it is where the source originated from.

While working with Git and remotes, you will get some benefits from Git.

We can start with git status and see what we get while working with the remote.

Getting ready

  1. We will start by checking out a local branch that tracks a remote branch:
    $ git checkout -b remoteBugFix --track origin/stable-3.2
    Branch remoteBugFix set up to track remote branch stable-3.2 from origin.
    Switched to a new branch 'remoteBugFix'
    
  2. The previous command creates and checks out the remoteBugFix branch that will track the origin/stable-3.2 branch. So, for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
Git Pocket Guide

Git Pocket Guide

Richard E. Silverman

Publisher Resources

ISBN: 9781787123205Supplemental Content