A1.5 Remote Repositories

You collaborate with other developers by using remote repositories to share your work and interact with others’ work. This section covers those commands, many of which are covered in Chapter 7, Working with Remote Repositories.

Clone a Repository

 
​prompt> git clone <some repository>

Clone a Repository but Download Only the Last 200 Commits

 
​prompt> git clone --depth 200 <some repository>

Add a New Named Remote Repository

 
​prompt> git remote add <remote repository> <repository url>

Show All Remote Branches

 
​prompt> git branch -r

Create a Local Branch from a Remote Branch

 
​prompt> git branch <new branch> <remote branch>

Create a Local Branch from a ...

Get Pragmatic Version Control Using Git now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.