How does Git version control work?

Computer Science

ScanSolve AI Answer

Git tracks changes to code over time. Key concepts: Repository (repo): project folder tracked by Git. Commit: a snapshot of changes with a message. Branch: parallel version of code (main/feature branches). Core workflow: git add (stage changes) → git commit (save snapshot) → git push (upload to remote). git pull: download latest changes. git merge: combine branches. git checkout -b: create new branch. Why: enables collaboration, tracks history, allows reverting mistakes, and supports parallel development.

Was this helpful?

Still stuck on this one?

Ask a follow-up, and the answer starts from this question.

Got a different question?Ask your own question