Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to clone a repository from GitHub.
Git
git [1] https://github.com/user/repo.git Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git push' instead of 'git clone'.
Using 'git init' which creates a new repo, not clone.
Using 'git commit' which saves changes, not clone.
✗ Incorrect
The git clone command copies a remote repository to your local machine.
2fill in blank
mediumComplete the command to clone a repository into a folder named 'project'.
Git
git clone https://github.com/user/repo.git [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the repo name 'repo' instead of the desired folder name.
Using 'clone' as folder name which is a command, not a folder.
Using 'folder' which is generic and not the intended folder name.
✗ Incorrect
Adding a folder name after the URL tells Git to clone into that folder.
3fill in blank
hardFix the error in the command to clone a repository using SSH.
Git
git [1] git@github.com:user/repo.git Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git push' which sends changes, not clone.
Using 'git pull' which updates existing repo, not clone.
Using 'git fetch' which downloads changes, not clone.
✗ Incorrect
To copy a repo via SSH, use git clone with the SSH URL.
4fill in blank
hardFill both blanks to clone a repository and then list its contents.
Git
git [1] https://github.com/user/repo.git && [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pwd' which shows current path, not files.
Using 'cd repo' which changes folder but doesn't list files.
✗ Incorrect
First, clone the repo with git clone. Then list files with ls.
5fill in blank
hardFill all three blanks to clone a repo, change into its folder, and show the current path.
Git
git [1] https://github.com/user/repo.git && [2] && [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ls' instead of 'pwd' to show current path.
Skipping 'cd repo' and trying to list files from outside.
✗ Incorrect
Clone the repo, move into its folder, then print the current directory path.