-
Notifications
You must be signed in to change notification settings - Fork 0
/
03s-using-github.md.erb
141 lines (83 loc) · 1.97 KB
/
03s-using-github.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
title: Using Git & GitHub
slug: github
date: 0003/01/02
number: 3.5
sidebar: true
contents: Learn how to use GitHub to follow along with the book.
paragraphs: 33
---
////
////
### Being Committed
////
////
////
<%= screenshot "s3-1", "A Git commit as shown on GitHub." %>
////
////
<%= screenshot "s3-2", "Modifying code." %>
////
////
<%= screenshot "s3-3", "Deleting code." %>
////
### Browsing A Commit's Code
////
////
<%= screenshot "s3-5", "The Browse code button." %>
////
<%= screenshot "s3-6", "The repository at commit 3-2." %>
////
<%= screenshot "s3-7", "The repository at commit 14-2." %>
### Accessing A Commit Locally
////
////
~~~bash
git clone git@github.com:DiscoverMeteor/Microscope.git github_microscope
~~~
////
////
~~~bash
cd github_microscope
~~~
////
////
~~~bash
git checkout chapter3-1
Note: checking out 'chapter3-1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at a004b56... Added basic posts list template and static data.
~~~
////
////
////
////
<%= screenshot "s3-4", "Finding a commit hash." %>
////
~~~bash
git checkout c7af59e425cd4e17c20cf99e51c8cd78f82c9932
Previous HEAD position was a004b56... Added basic posts list template and static data.
HEAD is now at c7af59e... Augmented the postsList route to take a limit
~~~
////
~~~bash
git checkout master
~~~
////
### Historical Perspective
////
////
<%= screenshot "s3-8", "GitHub's History button." %>
////
<%= screenshot "s3-9", "Displaying a file's history." %>
### The Blame Game
////
<%= screenshot "s3-10", "GitHub's Blame button." %>
////
<%= screenshot "s3-11", "GitHub's Blame view." %>
////