@@ -11,6 +11,7 @@ description: A student and teacher outline to the GitHub Advanced class.
11
11
* Scopes
12
12
* Excludesfile
13
13
14
+ #### Details
14
15
```
15
16
git config --list
16
17
git config user.name
@@ -26,6 +27,7 @@ git config --global color.ui auto
26
27
* Existing project
27
28
* Cloning
28
29
30
+ #### Details
29
31
```
30
32
git init [project-name]
31
33
@@ -38,22 +40,24 @@ git clone [url] [optional-name]
38
40
## Repository internals
39
41
40
42
### Summary
41
- * Exploring fundamentals
42
- * ` .git `
43
- * All history stored locally
44
- * Distributed nature, simultaneous changes
45
- * No locking
46
- * Optimized for text, small files
47
- * HEAD
48
- * Index/ Staging
43
+ * Exploring the fundamentals
44
+ * ` .git ` folder
45
+ * All history stored locally
46
+ * Distributed nature, simultaneous changes
47
+ * No locking
48
+ * Optimized for text, small files
49
+ * ` HEAD ` symbol
50
+ * Staging area (index file)
49
51
* ` refs/heads/ `
50
52
* Efficiency of storage (zlib)
51
53
52
54
## Commits at the command line
53
55
54
56
### Summary
55
57
* Three stage thinking
58
+ * edit, select, save
56
59
60
+ #### Details
57
61
```
58
62
git status
59
63
git add <filename>
@@ -70,6 +74,7 @@ git commit -m"<message>"
70
74
* Dependent upon file state
71
75
* Useful option switches
72
76
77
+ #### Details
73
78
```
74
79
git diff
75
80
git diff --staged
@@ -86,6 +91,7 @@ git diff --stat -w --color-words
86
91
* Filtering by message
87
92
* Filtering by patch
88
93
94
+ #### Details
89
95
```
90
96
git log
91
97
git log -<n>`
@@ -111,6 +117,7 @@ git log --decorate
111
117
* Deleting
112
118
* Renaming
113
119
120
+ #### Details
114
121
```
115
122
git branch
116
123
git branch <name> <ref>
@@ -128,6 +135,7 @@ git branch --no-merged
128
135
* Exploring detached ` HEAD ` s
129
136
* Discarding dirty working tree paths
130
137
138
+ #### Details
131
139
```
132
140
git checkout [branch]
133
141
git checkout -- [file]
@@ -142,6 +150,7 @@ git checkout [ref]
142
150
* Aliasing, bookmark to server URL
143
151
* Removing connections
144
152
153
+ #### Details
145
154
```
146
155
git clone -o github <URL>
147
156
git remote add <name> <path>
@@ -156,6 +165,7 @@ git remote rm <name>
156
165
* Showing remote branches
157
166
* Showing all branches
158
167
168
+ #### Details
159
169
```
160
170
git push -u origin master
161
171
git config --global push.default matching
@@ -171,6 +181,7 @@ git branch -a`
171
181
* Resolving conflicting merges (manually edit)
172
182
* Resolving file with shortcuts
173
183
184
+ #### Details
174
185
```
175
186
git pull origin
176
187
git pull
@@ -193,6 +204,7 @@ git commit
193
204
* Comparing without merge
194
205
* Merging selectively
195
206
207
+ #### Details
196
208
```
197
209
git fetch [remote]
198
210
git branch -a
@@ -205,6 +217,7 @@ git branch -a
205
217
* Removing files
206
218
* Un-tracking files
207
219
220
+ #### Details
208
221
``` shell
209
222
git add -u .
210
223
git rm < file>
@@ -217,6 +230,7 @@ git rm --cached -- <filename>
217
230
* Moving generates new tree, not a new blob
218
231
* Similarity Index engaged when committing
219
232
233
+ #### Details
220
234
``` shell
221
235
mv < file> < newfilename>
222
236
git add -A .
@@ -236,12 +250,12 @@ git log --follow <file>
236
250
* By commit ref, branch name, remote
237
251
* Why the different flavors (deep dive)
238
252
253
+ #### Details
239
254
``` shell
240
255
git revert < REF>
241
256
git reset --hard
242
257
git reset --mixed
243
258
git reset --soft
244
-
245
259
```
246
260
247
261
## Ignoring temporary files
@@ -253,6 +267,7 @@ git reset --soft
253
267
* Negation of ignore pattern
254
268
* Global/external ignore
255
269
270
+ #### Details
256
271
```
257
272
git config --global core.excludesfile
258
273
```
@@ -264,6 +279,7 @@ git config --global core.excludesfile
264
279
* Restoring by popping
265
280
* Move aside untracked files
266
281
282
+ #### Details
267
283
```
268
284
git stash
269
285
git pop
@@ -276,6 +292,7 @@ git stash --include-untracked
276
292
* Tracing Git action "history"
277
293
* Explore last actions
278
294
295
+ #### Details
279
296
```
280
297
git reflog
281
298
git reflog --all
@@ -302,6 +319,7 @@ git checkout HEAD@{1}
302
319
* Quicker access to complex commands
303
320
* Compatible with zsh completions
304
321
322
+ #### Details
305
323
```
306
324
git config --global alias.l "log --oneline --stat"
307
325
git config alias.s "status -s"
0 commit comments