Cloning
git clone copies a repository and sets origin. Here we clone a local folder.
Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
cd ..; git clone -q repo copy
cd copy
git remote -v | head -n 1 | awk '{print $1}'
git log --format=%sResult
origin first
Exercise
Copy a repository.
git url
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.