Module 2 Exercise 3: Wikipedia Switcheroo


(Vanessa) #48

:sparkles::sparkles:


(Vanessa) #49

Was looking for exactly that walkthrough / self assessment :slight_smile:


(Rohith Pudari) #50


(Roberto Martínez Román) #51


(Marco Chiapello) #52

Does the file show your first planet? Or the second?

The README.md files contains both planet’s descriptions.


(Arich.net) #53

Both planet entries are shown :slight_smile:


(Jake Hobbs) #54

Both planets are shown as currently working on the new branch. Reverting back to the master branch (git checkout master) would update the readme in the text editor and only show one planet.

Pasted terminal as screenshot to long…

Jakes-MacBook-Pro:~ jakehobbs$ cd ./Desktop
Jakes-MacBook-Pro:Desktop jakehobbs$ git init planets
Initialized empty Git repository in /Users/jakehobbs/Desktop/planets/.git/
Jakes-MacBook-Pro:Desktop jakehobbs$ cd ./planets
Jakes-MacBook-Pro:planets jakehobbs$ git status
On branch master

Initial commit

nothing to commit (create/copy files and use “git add” to track)
Jakes-MacBook-Pro:planets jakehobbs$ touch readme.md
Jakes-MacBook-Pro:planets jakehobbs$ git status
On branch master

Initial commit

Untracked files:
(use “git add …” to include in what will be committed)

readme.md

nothing added to commit but untracked files present (use “git add” to track)
Jakes-MacBook-Pro:planets jakehobbs$ git add readme.md
Jakes-MacBook-Pro:planets jakehobbs$ git status
On branch master

Initial commit

Changes to be committed:
(use “git rm --cached …” to unstage)

new file:   readme.md

Jakes-MacBook-Pro:planets jakehobbs$ git commit -m ‘create empty readme’
[master (root-commit) 2337387] create empty readme
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 readme.md
Jakes-MacBook-Pro:planets jakehobbs$ git status
On branch master
nothing to commit, working tree clean
Jakes-MacBook-Pro:planets jakehobbs$ git log
commit 23373879a15c6c2eb0408cf68b048a3daf6a224a
Author: Jake Hobbs jakehobbs@hotmail.co.uk
Date: Fri Jun 15 12:15:51 2018 +0100

create empty readme

Jakes-MacBook-Pro:planets jakehobbs$ brackets readme.md
Jakes-MacBook-Pro:planets jakehobbs$ git status
On branch master
Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git checkout – …” to discard changes in working directory)

modified:   readme.md

no changes added to commit (use “git add” and/or “git commit -a”)
Jakes-MacBook-Pro:planets jakehobbs$ git add readme.md
Jakes-MacBook-Pro:planets jakehobbs$ git commit -m ‘add uranus info’
[master e5c6a1c] add uranus info
1 file changed, 3 insertions(+)
Jakes-MacBook-Pro:planets jakehobbs$ git branch saturn
Jakes-MacBook-Pro:planets jakehobbs$ git checkout saturn
Switched to branch ‘saturn’
Jakes-MacBook-Pro:planets jakehobbs$ git status
On branch saturn
Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git checkout – …” to discard changes in working directory)

modified:   readme.md

no changes added to commit (use “git add” and/or “git commit -a”)
Jakes-MacBook-Pro:planets jakehobbs$ git add readme.md
Jakes-MacBook-Pro:planets jakehobbs$ git commit
[saturn 6ad82f5] ‘update readme with staturn info’
1 file changed, 7 insertions(+), 1 deletion(-)
Jakes-MacBook-Pro:planets jakehobbs$


(Isara Naranirattisai) #55

Here’s my screenshots



(Fernanda Ochoa) #56

Hi, this are my screenshots, and show both planets, because the Branch contains the master base content, if I do a checkout to master only can shows one of them.




(Dr. Ayaz H. Khan) #57


(Ygor Canalli) #58

It shows both! :slight_smile:


(Robert McKenney) #59

As expected, the current working branch - jupiter -shows both planets. The master branch will only have the first one.


(Takeshi Akima) #60

At the end of the steps, readme.md contains the both planets.


(Sanoakira) #61

both paragraph are shown in readme.md.


(Cwoods88keys) #62

On the new branch, readme contains both paragraphs.


(Hammad Mashkoor) #63


(Julia Damerow) #64

New branch has both paragraphs, master has just the first one.


(Dan Cline) #65

I don’t use atom, I use vim and I also pipe output to files :slight_smile:


(Mark Lantsberger) #66

All was smooth today! I like Atom, however the atom . command is not launching the app so you won’t see that in the terminal. Just switched over with the keyboard. My Jupiter branch will have both sets of text and the master would only have Mars in my example.


(Mrculp Mhs) #67

Slowly starting to figure this out. Excuse the extra commands.