Yup, makes perfect sense how git keeps “snapshots” of the work progress. But how does this tie to the “merge” topic?
I also found it a bit confusing and was not sure if I’m asked to replace the text or extend it. I chose the first option since the question is which text is shown. It is of course the second one when I’m on the branch where I created it, and the first one when I’m on master.
As per the exercise instructions, the new branch contains info about two planets. Switch back to the master branch confirms there is only info about one planet in the readme.
While in the new branch the readme shows both entries but when we go back tot he master branch, it only shows the first one.
The new branch contains info about two planets like it was to be. If I switch back to the master branch, I can see that is only info about one planet (Jupiter) in the readme.
The commend was: git show planets
The new branch consists the info about two planets and if I switched back to the master branch then it contains info about one planet.
@mozzadrella, here’s my submission for “Module 2 Exercise 3”
The file shows the data for both the planets.
Hello again! With new-branch checked out,
readme.md shows both, but with master checked out, it only shows the first planet added.
I could observe that when creating a new branch we don’t create a new readme file but git itself takes care of all the revisions. I can see different versions of readme.md file by switching using checkout command.
This is quite interesting as the first branch (master) retains the actual content but creating another branch provides extra information not available on the first branch. This is so cool