Branching and Merging
Branches let you develop features in isolation; merging brings the changes back together.
Easy
A branch is an independent line of work:
git switch -c feature/oled-display # create and switch
# ...commit work...
git switch main
git merge feature/oled-display
If two branches changed the same lines, Git reports a merge conflict that you resolve by editing the file. On GitHub, merges usually happen through a pull request, where teammates review the code first.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.