0
0
Gitdevops~10 mins

git diff for working directory changes - Interactive Code Practice

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

Complete the command to see changes in the working directory compared to the index.

Git
git [1]
Drag options to blanks, or click blank then click option'
Astatus
Blog
Ccommit
Ddiff
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git status' which shows file states but not detailed changes.
Using 'git log' which shows commit history, not file changes.
2fill in blank
medium

Complete the command to see changes only for a specific file named 'app.py'.

Git
git diff [1]
Drag options to blanks, or click blank then click option'
Aapp.py
B--staged
C--cached
DHEAD
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--staged' or '--cached' which show staged changes, not working directory changes.
Using 'HEAD' which compares to last commit but not limited to one file.
3fill in blank
hard

Fix the error in the command to show staged changes for all files.

Git
git [1] --staged
Drag options to blanks, or click blank then click option'
Astatus
Bdiff
Ccommit
Dpush
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git status --staged' which is invalid.
Confusing staged and unstaged changes.
4fill in blank
hard

Fill both blanks to show changes between the working directory and the last commit for the file 'README.md'.

Git
git [1] [2] README.md
Drag options to blanks, or click blank then click option'
Adiff
Bstatus
CHEAD
Dcommit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git status HEAD README.md' which is invalid.
Using 'git diff commit README.md' which is not a valid reference.
5fill in blank
hard

Fill all three blanks to create a command that shows staged changes for all files.

Git
git [1] [2] [3]
Drag options to blanks, or click blank then click option'
Adiff
B--staged
C--cached
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'git status --staged --cached' which is invalid.
Using only one option instead of both.