Programming foundations

Stage 2 of 6 · 8 lessons · ~4 weeks

Command line and Git

Get comfortable in the terminal and put every piece of code under version control. This is the tooling every team assumes on day one, and it protects your own work from now on.

Start: Navigating files in the shell

Lessons· one lesson for each topic, in this order

  1. 1Navigating files in the shell
  2. 2status, add, diff and commit
  3. 3What to commit and .gitignore
  4. 4Branches and merging
  5. 5Merge conflicts
  6. 6clone, fetch, pull and push
  7. 7Pull requests on GitHub
  8. 8stash, log and undoing mistakes

Start with· follow one of these

Practise

  • Draws the commit graph as you type, so merge and rebase stop being a mystery

  • Levels 0 to 15 build real shell reflexes: finding files, reading them, permissions

Keep handy

  • Free official book: read chapters 1 to 3, keep the rest for later

  • Recovery recipes for the day a commit goes wrong

Also worth your time

Before moving on: Put every program you have written in a GitHub repository with meaningful commit messages, and open, review and merge one pull request from a feature branch.

Tauseef's advice
Learn about a dozen commands well (status, add, diff, commit, log, branch, stash, fetch, pull, push, clone, remote -v) and use them every day; rebase, hooks and submodules can wait. Commit small, with messages that say why, because that history is what a reviewer reads first.

Mark this stage as not done?