Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to clone a repository from GitHub.
Linux CLI
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 'commit' instead of 'clone' will not copy the repository.
Using 'push' or 'pull' are for syncing changes, not cloning.
✗ Incorrect
The git clone command copies a remote repository to your local machine.
2fill in blank
mediumComplete the code to add all changed files to the staging area.
Linux CLI
git [1] . Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' directly without adding files first.
Using 'push' or 'status' do not stage files.
✗ Incorrect
The git add . command stages all changes in the current directory for the next commit.
3fill in blank
hardFix the error in the command to commit changes with a message.
Linux CLI
git commit -m [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes causes the shell to treat words separately.
Using mismatched or missing quotes causes errors.
✗ Incorrect
The commit message must be enclosed in quotes to be treated as a single argument.
4fill in blank
hardFill both blanks to create a new branch and switch to it.
Linux CLI
git [1] [2] && git checkout [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'checkout' to create a branch without '-b' option.
Switching to a branch that does not exist.
✗ Incorrect
git branch feature creates a new branch named 'feature'. Then git checkout feature switches to it.
5fill in blank
hardFill all three blanks to push the local branch to the remote repository.
Linux CLI
git [1] [2] [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'push' to send changes.
Mixing up remote and branch names.
✗ Incorrect
git push origin feature sends the local 'feature' branch to the remote named 'origin'.