Version Control
You wouldn't build a house without a safety harness. Don't code without version control.
Version Control Systems
Git commands the VCS market, with others being relegated to legacy holdouts.
System | Superpower | Flaw |
---|---|---|
Git | Distributed, branching magic | Steep learning curve |
SVN | Centralized simplicity | No local commits |
Mercurial | Easier than Git | Lost the VCS wars |
CVS | Pioneered versioning | File-level tracking |
Hosting Platforms
This is where the code lives.
Platform | Preferred by | Free Private Repos | Killer Feature |
---|---|---|---|
GitHub | Tech startups | Yes, up to 3 collaborators | Copilot integration, Actions CI/CD |
GitLab | Enterprise | Yes️ | Built-in DevOps pipeline |
Azure Repos | Microsoft shops | No | Azure integration |
Bitbucket | Jira addicts | Yes | Branch permissions |
Git Tips
-
Git first, code second: Always
git init
before writing your first line of code. -
Console > GUI. Tools like GitHub Desktop are great, but learn these four commands first:
git add .
git commit -m "save point"
git push
git checkout -bWhy? Because when your IDE's Git plugin mysteriously breaks (it will), you'll need to debug like a pro.
-
Your team's rules > textbook gitflow: You might love feature branches, but every company has their own "sacred" workflow. Observe first, then suggest improvements later.