git clone creates a local repository by copying an existing GitHub repository and its history. Run it from the parent directory where the new repository should live. section 19.5
Use this practical sequence:
- Create or select a repository on GitHub, then copy its clone link. section 19.5
- In PowerShell, change to the intended parent directory and run git clone with the repository URL. section 19.5
- Change into the new directory and inspect the copied files. section 19.5
Clone a SharePoint tools repository
PS C:\scripts> git clone https://github.com/psjamesp/sharepointtools.git PS C:\scripts> cd .\sharepointtools\ PS C:\scripts\sharepointtools> dir The resulting directory contains LICENSE and README.md. section 19.5
PS C:\scripts> git clone https://github.com/psjamesp/sharepointtools.git Cloning into 'sharepointtools'... remote: Counting objects: 4, done. remote: Compressing objects: 100% (3/3), done. remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (4/4), done.
View the clone operation and its transfer progress. section 19.5
PS C:\scripts> cd .\sharepointtools\
PS C:\scripts\sharepointtools> dir
Directory: C:\scripts\sharepointtools
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 6/19/2023 2:59 PM 1088 LICENSE
-a---- 6/19/2023 2:59 PM 44 README.md
View the files present after cloning. section 19.5
