0
0
Gitdevops~5 mins

Cloning a repository with git clone - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the command git clone do?

The git clone command copies a remote repository to your local machine, creating a new folder with all the project files and history.

Click to reveal answer
beginner
How do you clone a repository from GitHub using git clone?

Use git clone <repository-url>. For example: git clone https://github.com/user/repo.git

Click to reveal answer
beginner
What happens if you run git clone without specifying a folder name?

Git creates a new folder named after the repository by default and puts all files there.

Click to reveal answer
intermediate
How can you clone a repository into a folder with a custom name?

Use git clone <repository-url> <folder-name>. This clones the repo into the folder you specify.

Click to reveal answer
intermediate
What is the difference between cloning with HTTPS and SSH URLs?

HTTPS URLs require username/password or token for access. SSH URLs use keys for secure access without typing passwords each time.

Click to reveal answer
What does git clone https://github.com/user/repo.git do?
ADeletes the remote repository
BCopies the remote repository to your local machine
CUploads your local files to GitHub
DCreates a new remote repository
If you want to clone a repo into a folder named myproject, which command is correct?
Agit clone -folder myproject
Bgit clone myproject https://github.com/user/repo.git
Cgit clone https://github.com/user/repo.git
Dgit clone https://github.com/user/repo.git myproject
What folder name does Git use if you run git clone https://github.com/user/repo.git without extra arguments?
Auser
Bgithub
Crepo
Dclone
Which URL type allows cloning without typing your password every time?
ASSH URL
BHTTPS URL
CFTP URL
DHTTP URL
What is required to clone a private repository using HTTPS?
AUsername and password or token
BNothing, it is public
COnly SSH keys
DA VPN connection
Explain the steps and command to clone a repository from GitHub to your local machine.
Think about how you copy a folder from the internet to your computer.
You got /4 concepts.
    Describe the difference between cloning a repository using HTTPS and SSH URLs.
    Consider how you log in to websites versus using a secure key.
    You got /4 concepts.