Follow @endyourif rss Facebook LinkedIn

Cloning or Checking out a repository with GIT Cloning or Checking out a repository with GIT

Published on Feb 15, 2019

You have your own GIT repository or you wish to checkout a copy of a publicly or privately available repository to your computer.

To checkout or as GIT calls it, clone, a repository the git clone command. This command accepts many different arguments. In your command line, type: git help clone for the full supported list.

Be sure you have installed posh-git as I described in posh-git: the only GIT command line tool I use

99% of the times when I've wished to clone/checkout a GIT repository, I simply supply the URL to the repository. For example, I have a repository of several Knockout.js Examples.

git clone with posh-git

To checkout this repository to my local computer, I open up my command line (in my case Powershell with the awesome posh-git), navigate to the directory where I store my GIT repositories (in my case C:\GitHub) and perform the following command:
git clone

This will download all of the files in the repository into a new folder under my C:\GitHub folder called Knockout.js-Examples. Of course the directory name will change based on the name of the repository being cloned to your local computer.

Tags: Github | git | posh-git | git clone

My Books
ASP.NET MVC 5 With Bootstrap and Knockout.js
Knockout.js Building Dynamic Client-Side Applications
20 Recipes for Programming MVC 3
20 Recipes for Programming PhoneGap
Rapid Application Development with CakePHP