What is a commit in Git?
a) A snapshot of changes
b) A branch
c) A remote repository
d) A bug fix
Answer:
a) A snapshot of changes
Explanation:
A commit in Git is a snapshot of the project at a specific point in time. It captures the changes made to files and directories, storing them in the repository’s history. Each commit has a unique identifier (SHA) and contains metadata such as the author, date, and commit message.
Commits form the foundation of Git’s version control system, allowing you to track progress, revert to previous states, and collaborate with others by sharing these snapshots.
Effective use of commits helps maintain a clean and understandable project history, enabling better collaboration and project management.