Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to stage a file named example.txt.
Git
git [1] example.txt Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'add' will try to save changes without staging.
Using 'push' sends changes to a remote, not stage files.
Using 'clone' copies a repository, not stage files.
✗ Incorrect
The git add command stages files to prepare them for a commit.
2fill in blank
mediumComplete the command to stage all files in the current directory.
Git
git [1] . Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' will try to save changes without staging.
Using 'status' only shows changes, does not stage.
Using 'init' creates a new repo, not stage files.
✗ Incorrect
The dot . means all files in the current folder. git add . stages all changes.
3fill in blank
hardFix the error in the command to stage a file named notes.md.
Git
git [1] notes.md Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' without staging first causes no files to be saved.
Using 'push' sends changes to remote, not stage files.
Using 'merge' combines branches, not stage files.
✗ Incorrect
Only git add stages files. Other commands do different tasks.
4fill in blank
hardFill both blanks to stage all files with .txt extension.
Git
git [1] [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'add' will not stage files.
Using 'status' shows changes but does not stage.
Using a wrong pattern will not select the correct files.
✗ Incorrect
git add *.txt stages all text files in the folder.
5fill in blank
hardFill all three blanks to stage a file named report.md and then commit with message Update report.
Git
git [1] report.md && git [2] -m [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' before 'add' will not save changes.
Forgetting the message quotes causes errors.
Using 'push' instead of 'commit' does not save locally.
✗ Incorrect
First, git add report.md stages the file. Then git commit -m "Update report" saves the changes with a message.