The Readme.md file contains information about both planets (Earth & Mars) since the new branch was created AFTER the paragraph about the first planet was committed.
I see only the second planet.
We need a merge!
[quote=“mchugani, post:182, topic:25997”]
R the pa
It shows both, since the branch was based on the state where we added the paragraph on the first planet.
On the new branch, readme.md includes both planets. But on the master branch, readme.md includes only the first planet, as expected.
New branch shows both planets, because the new branch was started with the commit of the first planet.
I definitely did this one wrong, but have no idea how to fix it. I think I should have one paragraph in the first file and two in the second (that seems to be what others got). However, both branches are showing both paragraphs.
In the instructions, it says to make a new readme file for the new branch which I did but there is only ever one file in my planets folder. I looked at what other people have done and my commands are similar. I have no idea where I am going wrong.
Also, I’m really not sure how this activity is connected to the video for this module. It was on the merge command along with pull and fetch but we don’t seem to need to use any of those for this activity. I feel like I am missing something. Help?
Hey, I would suggest doing a
git status to give you more info of what is going on.
I see in your console that it failed to switch back to the master branch. Your Saturn branch should have both paragraph as it shows there.
It is a little tricky to be honest, but the fetch exercise is in activity 2 of module 2. This is act 3 of module 2, to practice branches.
Hope it helps!
I think I got it working now.
@mozzadrella My output now looks like some of the others in this thread but I am still confused about the connection between this activity and the video for 2.4 Merge. Was I supposed to merge or pull in this activity? I’m also still not sure of the purpose of the fetch command (I asked about it in the Module 2 Exercise 2 thread but haven’t got a reply yet). When/why would I use these?
- Create a repository on your desktop called ‘planets’ with a readme.md and commit it.
- Choose a Wikipedia page about a planet of your choice.
- Copy the first paragraph about the planet, paste it into your readme.md and commit it.
- Create a new branch (git branch ) and switch to it (git checkout ).
- In atom, add Wikipedia entry about another planet into that branch’s readme.
- Save, then commit, then close out of atom.
- Does the file show your first planet? Or the second?
- Take a screenshot of your output and post it below.