0
0
Gitdevops~10 mins

git add for staging files - Interactive Code Practice

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

Complete the command to stage a file named example.txt.

Git
git [1] example.txt
Drag options to blanks, or click blank then click option'
Aadd
Bcommit
Cpush
Dclone
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.
2fill in blank
medium

Complete the command to stage all files in the current directory.

Git
git [1] .
Drag options to blanks, or click blank then click option'
Acommit
Bstatus
Cadd
Dinit
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.
3fill in blank
hard

Fix 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'
Amerge
Badd
Cpush
Dcommit
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.
4fill in blank
hard

Fill both blanks to stage all files with .txt extension.

Git
git [1] [2]
Drag options to blanks, or click blank then click option'
Aadd
Bcommit
C*.txt
Dstatus
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.
5fill in blank
hard

Fill 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'
Aadd
Bcommit
C"Update report"
Dpush
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.