Lesson 4 / 18
Pushing & Cloning
Send commits to GitHub, and get a full copy of a repo onto a new machine.
Pushing changes
Once a remote is set, git push sends new commits to GitHub for others to see.
git push origin mainCloning a repo
git clone downloads the full history of a repo and sets up origin automatically — ready to work immediately.
git clone https://github.com/username/my-app.gitQuick check: Which command downloads a full copy of a remote repository, including its history?
- git remote add origin
- git clone
- git push
Answer
git clone — `git clone` copies the entire repository, while `git remote add` only links an existing local repo to a URL.