

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Merge
incomplete
2: Merge Commits
incomplete
3: Merge Log
incomplete
4: Fast Forward Merge
incomplete
5: Fast Forward Commit
incomplete
This lesson's interactive features are locked, please to keep using them
"What's the point of having multiple branches?" you might ask. They're most often used to safely make changes without affecting your (or your team's) primary branch. However, once you're happy with your changes, you'll want to merge them back into the main branch so that they make their way into the final product.
Click to play video
Let's say you're in a state where you have two branches, each with their own unique commits:
A - B - C main
\
D - E other_branch
If you merge other_branch into main, Git combines both branches by creating a new commit that has both histories as parents. In the diagram below, F is a merge commit that has C and E as parents. F brings all the changes from D and E back into the main branch.
A - B - C - F main
\ /
D - E other_branch
# contents
- titles.md: The movie titles in the WebFlyx collection
- classics.csv: A comma-separated list of classic movies
- quotes: A directory of files containing memorable quotes from movies
A - B - C - E main
\
D add_classics
Run git log --oneline --graph --all and you should see a nice ASCII art representation of your commit history.
Run and submit the CLI tests.