Skip to main content

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.

SystemSuperpowerFlaw
GitDistributed, branching magicSteep learning curve
SVNCentralized simplicityNo local commits
MercurialEasier than GitLost the VCS wars
CVSPioneered versioningFile-level tracking

Hosting Platforms

This is where the code lives.

PlatformPreferred byFree Private ReposKiller Feature
GitHubTech startupsYes, up to 3 collaboratorsCopilot integration, Actions CI/CD
GitLabEnterpriseYes️Built-in DevOps pipeline
Azure ReposMicrosoft shopsNoAzure integration
BitbucketJira addictsYesBranch permissions

Git Tips

  1. Git first, code second: Always git init before writing your first line of code.

  2. 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 -b

    Why? Because when your IDE's Git plugin mysteriously breaks (it will), you'll need to debug like a pro.

  3. 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.