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 'push' instead of 'clone' will try to send changes, not download.
✗ Incorrect
The git clone command copies a remote repository to your local machine.
2fill in blank
mediumComplete the command to create a new branch named 'feature'.
Git
git [1] feature Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'checkout' creates and switches branches, not just create.
✗ Incorrect
The git branch command creates a new branch without switching to it.
3fill in blank
hardFix the error in the command to switch to the 'develop' branch.
Git
git [1] develop Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' tries to save changes, not switch branches.
✗ Incorrect
The git checkout command switches branches in your local repository.
4fill in blank
hardFill both blanks to create a new branch and switch to it in one command.
Git
git [1] -b [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'checkout' will not create or switch branches.
✗ Incorrect
The command git checkout -b feature creates and switches to the 'feature' branch.
5fill in blank
hardFill all three blanks to merge the 'feature' branch into 'main' and push changes.
Git
git [1] feature && git [2] origin [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pull' instead of 'push' will fetch changes, not send them.
✗ Incorrect
This sequence merges 'feature' into 'main' locally, then pushes 'main' to the remote repository.