main git-github/lessons/04-merging-and-conflicts

README.md

Lesson 4: Merging and conflicts

In this lesson you'll work through merging and conflicts step by step, with short exercises after each idea.

Full lesson: https://glibcode.net/courses/git-github/lessons/4

Files

  • commands.sh: a merge with a conflict and how to finish it

Tip: man pages are long; tldr <command> gives you the common cases.

Tip: history | grep ssh finds that command you typed last week.

Tip: Quote your variables: "$file" survives spaces in names, $file doesn't.

Tip: set -euo pipefail at the top of a script stops it at the first error.

Run it

# type the commands from commands.sh one by one; don't run it as a script

Exercises

See exercises.md. Ask in the forum after you have tried.