git cloning code example

Example 1: git clone

#You will be required to sign into github

git clone [email protected]:UserName/gitRepositories.git

Example 2: clone repository git

git clone https://[email protected]/teamsinspace/documentation-tests.git

Example 3: clone branch git

git clone <repository_url>
git branch -a
git checkout <branch_name>

Example 4: git clone

gh repo clone <repository> [<directory>] [-- <gitflags>...] 
# With the new GitHub CLI

Example 5: take clone from gitbash

$ git clone https://github.com/libgit2/libgit2 mylibgit