EasyEnv
Engineering/Courses/Catalog/Git/Branches and Merging
Git
BeginnerLesson 3 of 1330 min · hands-on

Branches and Merging

Part of the Git course

Every commit you have made so far sits on one single line of history called main. Real work rarely stays that simple. You want to try an idea without risking the working version, or two people need to work on different features at the same time without stepping on each other. Git's answer is the branch: a lightweight, movable label pointing at a commit.

This lesson works in the hello-git repository from lesson 01, rebuilt here so the lesson also works on its own. Press Play to create it in this lesson's folder with one commit (pressing it again starts over) ...

Want to learn Git Branches and Merging in a real environment?

Click below, get a fresh Linux box with Git ready to go, and work through Branches and Merging hands-on with an AI tutor that knows your code.

Start this lessonBranches and Merging

What you'll learn

  • Git branch
  • Git switch
  • Fast-forward merge
  • Three-way merge
  • Merge commit

Read this lesson in your language

All lessons in this course

13 lessons
  1. 1Init and Your First Commit25 min
  2. 2Status, Diff, and Log25 min
  3. 3Branches and Merging30 min
  4. 4Resolving Merge Conflicts30 min
  5. 5Remotes: Push, Pull, Fetch30 min
  6. 6Stash and Cherry-pick25 min
  7. 7Rebasing30 min
  8. 8Interactive Rebase and Squashing30 min
  9. 9Tags and Releases20 min
  10. 10Branching Workflows20 min
  11. 11Recovering Lost Work25 min
  12. 12Hooks25 min
  13. 13Capstone: A Full Pull Request Flow40 min

Explore other courses

Branches and Merging - Git (English) | Engineering Courses