Git Clone

Git Clone 1

git clone command clones a remote directory from online (GitHub) and creates a new directory in your machine .this command doesn’t clone the complete repo, development branches within refs/heads/ are not permitted to be cloned.anyone can clone any public repositories .we can use git clone once again, if it already exists in our machine, this time it fetches changes in the repository.

Clone a repository

git clone <repository url>


git clone

when remote repositories are cloned using default command clone, the master branch of the origin remote will be clone origin/master

Clone a branch

git clone <repository url> -b <branch name>


git clone -b windows-ci

Clone a repo to the new directory

 git clone <repository url> <dirname> 

Create a shallow clone with last 15 commits

git clone --depth 15 <repository url>
Default image
Vishal Devxo
Vishal Devxo is a DevOps engineer and a Backend developer, he spends all his time for creating good tutorials with better visuals and blogging, developed some projects based on Python-Django, some hacking modules and scripts in python