0
0
Gitdevops~10 mins

git commit with message - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to commit changes with a message.

Git
git commit -m [1]
Drag options to blanks, or click blank then click option'
A"Initial commit"
B-a
Cpush
Dstatus
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.
2fill in blank
medium

Complete 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'
A-a
B--amend
C-v
D--help
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.
3fill in blank
hard

Fix 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'
AInitial commit
Bcommit message
C-m "Initial commit"
D"Initial commit"
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the message.
Repeating the -m option.
Using plain text without quotes.
4fill in blank
hard

Fill 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'
A-a
B-m
C--amend
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Using --amend instead of -a.
Switching the order of options.
Omitting the -m option.
5fill in blank
hard

Fill 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'
A-a
B-m
C--amend
D-v
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.