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:

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

Pick a platform, initialize your repo, and start small. The best version control setup is the one you'll actually use.