0
0
Gitdevops~10 mins

Working directory state in Git - Interactive Code Practice

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

Complete the command to check the current status of your working directory.

Git
git [1]
Drag options to blanks, or click blank then click option'
Astatus
Bpush
Cclone
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git commit' instead of 'git status' to check changes.
Using 'git push' which sends changes to remote, not shows status.
2fill in blank
medium

Complete the command to discard changes in a file named app.py and restore it to the last committed state.

Git
git checkout -- [1]
Drag options to blanks, or click blank then click option'
Aconfig.yaml
BREADME.md
Cindex.html
Dapp.py
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong file name that does not exist.
Omitting the double dash -- which separates options from file names.
3fill in blank
hard

Fix the error in the command to stage all changed files for commit.

Git
git [1] .
Drag options to blanks, or click blank then click option'
Acommit
Bpush
Cadd
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git commit .' which tries to commit without staging.
Using 'git push .' which is invalid syntax.
4fill in blank
hard

Complete the command to switch to the branch named feature.

Git
git [1] [2]
Drag options to blanks, or click blank then click option'
Acheckout
Bbranch
Cfeature
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git branch feature' only creates but does not switch.
Using 'git commit feature' which is invalid.
5fill in blank
hard

Fill all three blanks to show the differences between the working directory and the last commit for the file server.js.

Git
git [1] [2] [3]
Drag options to blanks, or click blank then click option'
Adiff
B--
Cserver.js
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git status server.js' which shows status but not detailed differences.
Omitting the double dash which can confuse git about arguments.