Version control records incremental changes to code over time. Git operates on a distributed architecture where every developer holds a full copy of the repository history locally.
flowchart LR
subgraph Centralized ["Centralized VCS"]
C1["Central Server"] <--> U1["Developer A"]
C1 <--> U2["Developer B"]
end
subgraph Distributed ["Distributed VCS (Git)"]
R1["Remote Repo"] <--> L1["Dev A Local Repo"]
R1 <--> L2["Dev B Local Repo"]
end
Git is a popular version control system.
It was created by Linus Torvalds in 2005, and has been maintained by Junio Hamano since then.
It is used for:
Note: Most Git actions (like staging, committing, and viewing history) happen on your own computer.
Only Push and Pull interact with remote servers like GitHub, GitLab, or Bitbucket to upload or download changes.
Execute the following terminal commands to work with this concept in your workspace:
# Check local Git version
git --version
# Display system configuration settings
git config --list --show-origin
Fix CORS bug rather than Fixed CORS bug).git diff to review unstaged modifications before adding files to the index.git switch -c <branch-name> to preserve edits.git restore --staged <filename> to remove the file from the index without altering your local workspace copy.Open your terminal in a test project directory, execute git status, and verify your current working tree state. Practice running git log --oneline to review commit history.
Sign in to track your learning journey, earn industry-recognized certificates, and join our elite developer community.
Quick Access With