0
0
Gitdevops~10 mins

Git mental model (snapshots not diffs) - Interactive Code Practice

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

Complete the command to create a new commit snapshot in Git.

Git
git commit -m [1]
Drag options to blanks, or click blank then click option'
A-a
B"Initial commit"
Cpush
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' instead of a message
Omitting the message quotes
2fill in blank
medium

Complete the command to see the current snapshot history in Git.

Git
git [1]
Drag options to blanks, or click blank then click option'
Abranch
Bclone
Cadd
Dlog
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'add' which stages files
Using 'branch' which manages branches
3fill in blank
hard

Fix the error in the command to save all changes as a snapshot.

Git
git [1] -m "Save all changes"
Drag options to blanks, or click blank then click option'
Acommit
Bstatus
Cpush
Dcheckout
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' which sends commits to remote
Using 'status' which shows current state
4fill in blank
hard

Fill both blanks to create a snapshot after adding files.

Git
git [1] . && git [2] -m "Snapshot after adding files"
Drag options to blanks, or click blank then click option'
Aadd
Bcommit
Cpush
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' instead of 'commit'
Skipping 'add' before commit
5fill in blank
hard

Fill all three blanks to create a snapshot and send it to the remote repository.

Git
git [1] . && git [2] -m "Update snapshot" && git [3] origin main
Drag options to blanks, or click blank then click option'
Aadd
Bcommit
Cpush
Dfetch
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'fetch' instead of 'push'
Committing before adding files