Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to commit 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
Forgetting to use quotes around the message.
Using git commit without -m option.
Using git push instead of commit.
✗ Incorrect
The -m option is used to add a commit message in quotes.
2fill in blank
mediumComplete the code to commit all changed files with a message.
Git
git commit [1] -m "Update files"
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using --amend which modifies the last commit.
Using -v which shows verbose output.
Using --help which shows help info.
✗ Incorrect
The -a option stages all changed files before committing.
3fill in blank
hardFix the error in the commit command to add a message.
Git
git commit -m [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the message.
Repeating the -m option.
Using plain text without quotes.
✗ Incorrect
The commit message must be inside quotes after -m.
4fill in blank
hardFill both blanks to commit with a message and include all changes.
Git
git commit [1] [2] "Fix bugs"
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using --amend instead of -a.
Switching the order of options.
Omitting the -m option.
✗ Incorrect
Use -a to stage all changes and -m to add the message.
5fill in blank
hardFill all three blanks to commit with a message, stage all changes, and amend the last commit.
Git
git commit [1] [2] [3] "Update README"
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting --amend when trying to modify last commit.
Wrong order of options.
Forgetting to use -m for the message.
✗ Incorrect
Use --amend to modify last commit, -a to stage all, and -m for message.