Vous êtes sur la page 1sur 1

Q: What happens when you initialize a repository? Why do you need to do it?

A: When we initialize a repository, the git starts tracking your activity on any
file in that folder.Then we can perform all the git commands
on those files too. Also, number of commits will be 0 as no commits were made
after initialization of Git.
Q: How is the staging area different from the working directory and the reposito
ry? What value do you think it offers?
A: Staging area is the intermediate stage before going to commit directly. We ca
n add or delete multiple files to staging area. All of them are treated as a sin
gle commit ( snapshot of all the files at the time of commit).