0
0
Gitdevops~5 mins

How files move between three areas in Git - Quick Revision & Summary

Choose your learning style9 modes available
Recall & Review
beginner
What are the three main areas where files move in Git?
The three main areas are: Working Directory (where you edit files), Staging Area (where you prepare files to commit), and Repository (where committed files are stored).
Click to reveal answer
beginner
What command moves files from the Working Directory to the Staging Area?
The command is git add <filename>. It tells Git to prepare the file for the next commit.
Click to reveal answer
beginner
What command moves files from the Staging Area to the Repository?
The command is git commit -m "message". It saves the staged changes permanently in the repository.
Click to reveal answer
intermediate
What happens if you change a file after staging it but before committing?
The changes after staging are not included in the commit unless you stage the file again with git add <filename>.
Click to reveal answer
beginner
Explain the role of the Working Directory in Git.
The Working Directory is where you create and edit files. It reflects the current state of your project on your computer before staging or committing.
Click to reveal answer
Which Git area holds files you are currently editing?
ARepository
BStaging Area
CWorking Directory
DRemote Server
What command stages a file for commit?
Agit add
Bgit push
Cgit commit
Dgit clone
After staging, how do you save changes permanently in Git?
Agit add
Bgit pull
Cgit status
Dgit commit
If you edit a file after staging it, what must you do to include the new changes in the commit?
ARun git add again
BNothing, it is automatic
CRun git commit twice
DRun git push
Which area in Git stores committed files?
AStaging Area
BRepository
CWorking Directory
DIndex
Describe the journey of a file from being edited to being saved in Git.
Think about the commands and areas the file passes through.
You got /5 concepts.
    Explain why staging is important in Git and how it helps control commits.
    Consider how staging lets you choose what to include in a commit.
    You got /4 concepts.