Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to add a file to the staging area.
Git
git [1] README.md Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'add'
Using 'push' to stage files
✗ Incorrect
The git add command moves changes to the staging area before committing.
2fill in blank
mediumComplete the code to commit staged changes with a message.
Git
git commit -m [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a filename instead of a message
Omitting quotes around the message
✗ Incorrect
The commit message must be a string in quotes describing the changes.
3fill in blank
hardFix the error in the command to add all changed files to staging.
Git
git [1] . Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'add'
Using 'push' which sends commits to remote
✗ Incorrect
To stage all changes, use git add . which adds all files in the current directory.
4fill in blank
hardFill both blanks to show the status of files and then stage a specific file.
Git
git [1] git [2] index.html
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'commit' instead of 'add' to stage
Using 'push' instead of 'status' to check changes
✗ Incorrect
git status shows file changes, and git add stages a file.
5fill in blank
hardFill all three blanks to stage, commit with a message, and then push changes.
Git
git [1] app.py git commit -m [2] git [3] origin main
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Skipping staging before commit
Using 'clone' instead of 'push' to send changes
✗ Incorrect
First stage the file with add, then commit with a message, finally push to remote.