24 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/assessments/exit_ticket.md:
--------------------------------------------------------------------------------
1 | How do you create a copy of a repo under your own GitHub account so that you can alter the code?
2 |
3 | A. Forking it via the GitHub interface.
4 | B. `git fork`
5 | C. `git clone`
6 | D. `git pull-request`
7 |
8 |
9 | How do you check the state of your local git repository since your last commit?
10 |
11 | A. `git check`
12 | B. `git status`
13 | C. `git commit`
14 | D. `git other`
15 |
16 | What is the command for staging all the changes you made?
17 |
18 | A. `git commit add .`
19 | B. `git commit .`
20 | C. `git add .`
21 | D. `git push -m "Message"`
22 |
23 | How do you supply a commit message to a commit?
24 |
25 | A. `git message "I'm coding"`
26 | B. `git add "I'm coding"`
27 | C. `git commit "I'm coding"`
28 | D. `git commit -m "I'm coding"`
29 |
30 | How do you submit your code to the original user?
31 |
32 | A. `git submit`
33 | B. `git pull-request`
34 | C. By creating a Pull Request through the GitHub interface
35 | D. `git commit -am "Done with Lab"`
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #Project 1: Mr. Potato Head
2 |
3 | 
4 |
5 | ## Before Class
6 |
7 | ### Teacher Preparation
8 | The lead teacher must clone this repository before the start of class. Students will be forking from your repo.
9 | ### Daily Objective
10 |
11 | Students will understand the basics of version control. They will be able to setup an account on Github and perform the `fork` `clone` and `push` operations.
12 |
13 | ### Key Points
14 |
15 | * **Git** is an example of a version control software.
16 | * **GitHub** is a service that lets programmers use **Git** to store their work on cloud-based servers.
17 | * **GitHub** is widely used in the industry for collaboration.
18 |
19 | ### Assessment
20 |
21 | 1. Write the Exit Ticket based off [assessments from current lesson](assessments/).
22 |
23 | Students will show progress toward reaching the objective based on their performance on the Exit Ticket quiz.
24 |
25 | ### Vocabulary
26 |
27 | * Version control
28 | * Git
29 | * Github
30 | * Repository (repo)
31 | * Clone
32 | * Push
33 | * Pull
34 | * Fork
35 | * Merge
36 | * Stage
37 | * Commit
38 |
39 | ### References
40 | * [Presentation Slides](https://docs.google.com/presentation/d/1eH0T3ESKY7AJQjtAL7_X4-uWqJRXwgKGguoAbmQmzRw/edit?usp=sharing)
41 | * http://gitref.org/basic/
42 | * https://try.github.io/levels/1/challenges/1
43 | * http://en.wikipedia.org/wiki/Revision_control
44 | * http://en.wikipedia.org/wiki/Git_(software)
45 | * http://git-scm.com/docs/git-merge
46 |
47 | ## During Class
48 |
49 | ### Do Now
50 |
51 | 1. Attendance
52 | 2. Return reviewed Exit Ticket from the previous class.
53 | 3. The Do Now can be found on slide 1 of the [Presentation Slides](https://docs.google.com/presentation/d/1eH0T3ESKY7AJQjtAL7_X4-uWqJRXwgKGguoAbmQmzRw/edit?usp=sharing).
54 |
55 | ### Opening
56 |
57 | Today, we will learn about collaboration through the use of **Git** and **GitHub**.
58 |
59 | The opening lecture can be found on slides 2-4 of the [Presentation Slides](https://docs.google.com/presentation/d/1eH0T3ESKY7AJQjtAL7_X4-uWqJRXwgKGguoAbmQmzRw/edit?usp=sharing).
60 |
61 |
62 |
63 | ### Introduction to New Material ("I Do")
64 |
65 | During this "I Do" lecture, the teacher is going to demonstrate forking a repo on pushing any changes using the terminal.
66 |
67 | ##### (1) Locate the repo.
68 |
69 | Find the **repository** you are looking for by searching its name or username of the owner in **GitHub**.
70 |
71 | A **repository** (or repo) is a place where we store our code.
72 |
73 | ##### (2) Fork the repo.
74 |
75 | **GitHub** allows us to **fork** the repo by simply clicking the **`Fork`** button in the top-right corner of any repository.
76 |
77 | ##### (3) Clone this repo into your own Cloud9 account workspace.
78 | 1. Copy the "Clone URL" from this **repo**.
79 | 2. In your Cloud9 dashboard, click on the "Create New Workspace" button and paste the URL you just copied to your clipboard.
80 |
81 |
82 | ##### (4) Add the code assigned to you.
83 | For this project, I am going to add the arms to Mr. Potato Head in the potatohead.html file.
84 |
85 |
86 | ##### (5) Add.
87 |
88 | A **`push`** is an action to upload the work saved on your Cloud9 to your GitHub repo.
89 |
90 | First, we make sure that our changes were completed properly. We do this by using the `git status` command.
91 |
92 | **Git** has detected that we have changed the file. But as it notes, we must add it to our list of files we want to update. We do this by:
93 |
94 | ```
95 | git add .
96 | ```
97 |
98 | The "." signifies adding all the changes you made.
99 |
100 | ##### (6) Commit.
101 |
102 | When we **`commit`** a file, we tell Git that we're about to make our change final. This gives Git a chance to record any changes made. We also need to provide a message saying what changed so that other programmers can understand what we did.
103 |
104 | ```
105 | git commit -m "added arms"
106 | ```
107 |
108 | ##### (7) Push
109 |
110 | We are now ready to `push` our modified code to Github's servers. We do this by:
111 |
112 | ```
113 | git push origin master
114 | ```
115 |
116 | You can now go to your repository on GitHub and see the changes you made.
117 |
118 | ##### (8) Pull Request
119 |
120 | Now that our repo is up to date we will need to ask the owner of the orignal repo to accept our changes with a **`pull request`**.
121 |
122 | A **pull request** is completed by clicking the small green button on the repo page
123 | 
124 |
125 |
126 | ### Guided Practice ("We do")
127 |
128 | Before everyone gets started on this project, we will divide up in pairs and assign a Potato Head body part to each pair.
129 |
130 | The teacher will match each grouping of students with a body part:
131 |
132 | * Arms
133 | * Ears
134 | * Eyes
135 | * Mouth
136 | * Nose
137 | * Eyebrows
138 |
139 |
140 |
141 | ### Independent practice ("You do")
142 | Build the Potato Head.
143 |
144 | 1. Fork the instructor's repo.
145 | 2. Clone your new repo in cloud.
146 | 3. Add your Potato body part to `potatohead.html`.
147 |
148 | In the Cloud 9 terminal, type the following commands:
149 |
150 | 1. git status
151 | 2. git add .
152 | 3. git commit -m "Commit message"
153 | 4. git push origin master (or whatever initial branch is, typically master)
154 |
155 | After **pushing** your code, send a **pull request** to the owner of the **repo**.
156 |
157 | ### Exit Ticket
158 |
159 | Give the Exit Ticket.
160 |
161 | ### Closing
162 |
163 | Accept all of the **pull requests** and show off everyone's work on the board by plugging the potatohead.html URL into www.rawgit.com
164 |
165 | ### Homework
166 |
167 | [Link to Homework](homework/)
168 |
169 | Remind students when homework is due and how it will be collected.
170 |
171 | ## After Class
172 |
173 | * Review the Exit Tickets.
174 | * Prepare for next lesson / hand off to next volunteer in rotation.
175 |
--------------------------------------------------------------------------------