-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
312 lines (298 loc) Β· 15.9 KB
/
index.html
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="">
<meta property="og:type" content="">
<meta property="og:url" content="">
<meta property="og:image" content="">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
<!-- todo - add favicon -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Solitreo&family=Work+Sans:wght@400;700&display=swap"
rel="stylesheet">
<meta name="theme-color" content="#fafafa">
</head>
<!-- todo - add show and hide icons to buttons w/Javascript to change them out -->
<body>
<header class="flex-wrapper">
<div class="content-wrapper">
<h1>Git & GitHub Workflow</h1>
</div>
</header>
<main class="flex-wrapper">
<div class="content-wrapper">
<h2>Beginning a new project</h2>
<section class="new-projects section-wrapper">
<div class="list-wrapper">
<button type="button" class="reveal-list">New Git Repo</button>
<ol class="new-git-repo hide list">
<li class="git-list-item unstruck">git init</li>
<li class="git-list-item unstruck">git add -A</li>
<li class="git-list-item unstruck">git commit -m "<i>My Message</i>"</li>
<li class="git-list-item unstruck">Create GitHub repo</li>
<li class="git-list-item unstruck">Make sure ssh is checked and copy commands from GitHub to add remote repo
to local project</li>
</ol>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Make A New Project</button>
<ol class="make-new-project hide list">
<li class="git-list-item unstruck">mkdir <i>my-directory-name</i></li>
<li class="git-list-item unstruck">cd <i>my-directory-name</i></li>
<li class="git-list-item unstruck">touch <i>my-filename</i></li>
<li class="git-list-item unstruck">git init</li>
<li class="git-list-item unstruck">git add -A</li>
<li class="git-list-item unstruck">git commit -m "<i>My Message</i>"</li>
<li class="git-list-item unstruck">Create GitHub repo</li>
<li class="git-list-item unstruck">Make sure ssh is checked and copy commands from GitHub to add remote repo
to local project</li>
</ol>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Fork and Clone Project</button>
<ol class="clone-project hide list">
<li class="git-list-item unstruck">Fork project</li>
<li class="git-list-item unstruck">Choose only main branch or additional topic branches to be forked</li>
<li class="git-list-item unstruck">Copy ssh url from my repo</li>
<li class="git-list-item unstruck">Navigate in the command line to where directory will be added</li>
<li class="git-list-item unstruck">git clone <i>ssh url from my repo</i></li>
<li class="git-list-item unstruck">cd <i>my-project-name</i></li>
</ol>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Download Project</button>
<ol class="download-project hide list">
<li class="git-list-item unstruck">cd <i>my-directory-name</i></li>
<li class="git-list-item unstruck">touch <i>my-filename</i></li>
<li class="git-list-item unstruck">git init</li>
<li class="git-list-item unstruck">git add -A</li>
<li class="git-list-item unstruck">git commit -m "<i>My Message</i>"</li>
<li class="git-list-item unstruck">Create GitHub repo</li>
<li class="git-list-item unstruck">Make sure ssh is checked and copy commands from GitHub to add remote repo
to local project</li>
</ol>
</div>
</section>
<h2>Existing projects</h2>
<section class="existing-projects section-wrapper">
<div class="list-wrapper">
<button type="button" class="reveal-list">Updating Existing Project</button>
<ol class="update-existing-project hide list">
<li class="git-list-item unstruck">git add -A</li>
<li class="git-list-item unstruck">git commit -m "<i>My Message</i>"</li>
<li class="git-list-item unstruck">git push origin <i>my-branch-name</i></li>
</ol>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Creating a Topic Branch</button>
<ol class="create-topic-branch hide list">
<li class="git-list-item unstruck">Add and commit all changes before switching branches</li>
<ul>
<li class="git-list-item unstruck">git add -A</li>
<li class="git-list-item unstruck">git commit -m "<i>My Message</i>"</li>
</ul>
<li class="git-list-item unstruck">git checkout -b <i>my-topic-branch-name</i></li>
</ol>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Merge Topic Branch into Main Branch</button>
<ol class="merge-topic-branch hide list">
<li class="git-list-item unstruck">Add and commit all changes before switching branches</li>
<ul>
<li class="git-list-item unstruck">git add -A</li>
<li class="git-list-item unstruck">git commit -m "<i>My Message</i>"</li>
</ul>
<li class="git-list-item unstruck">git checkout main</li>
<li class="git-list-item unstruck">git merge <i>my-topic-branch-name</i> -m "<i>My Message</i>"</li>
</ol>
</div>
</section>
<h2>Working with a team</h2>
<section class="existing-projects section-wrapper">
<div class="list-wrapper">
<button type="button" class="reveal-list">I'm Added to the Project</button>
<ol class="working-with-a-team hide list">
<li class="git-list-item unstruck">Fork project</li>
<li class="git-list-item unstruck">Choose only main branch or additional topic branches to be forked</li>
<li class="git-list-item unstruck">Copy ssh url from my repo</li>
<li class="git-list-item unstruck">Navigate in the command line to where directory will be added</li>
<li class="git-list-item unstruck">git clone <i>ssh url from my repo</i></li>
<li class="git-list-item unstruck">cd <i>my-project-name</i></li>
<li class="git-list-item unstruck">Create a topic branch</li>
<ul>
<li class="git-list-item unstruck">git checkout -b <i>my-topic-branch-name</i></li>
</ul>
<li class="git-list-item unstruck">Work on the topic branch</li>
<li class="git-list-item unstruck">git add -A</li>
<li class="git-list-item unstruck">git commit -m "<i>My Message</i>"</li>
<li class="git-list-item unstruck">Merge work into main branch</li>
<ul>
<li class="git-list-item unstruck">git checkout main</li>
<li class="git-list-item unstruck">git merge <i>my-topic-branch-name</i> -m "<i>My Message</i>"</li>
</ul>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Update Local Branchs with Upstream Branch</button>
<ol class="update-local-branches hide list">
<li class="git-list-item unstruck">Connect to the upstream repo</li>
<ul>
<li class="git-list-item unstruck">git remote add upstream <i>ssh url from upstream repo</i></li>
</ul>
<li class="git-list-item unstruck">Fetch from upsteam branch</li>
<ul>
<li class="git-list-item unstruck">git fetch upstream</li>
</ul>
<li class="git-list-item unstruck">Checkout main branch</li>
<ul>
<li class="git-list-item unstruck">git checkout main</li>
</ul>
<li class="git-list-item unstruck">Merge upstream main branch into local main branch</li>
<ul>
<li class="git-list-item unstruck">git merge upstream/main</li>
</ul>
<li class="git-list-item unstruck">Checkout topic branch</li>
<ul>
<li class="git-list-item unstruck">git checkout <i>my-topic-branch</i></li>
</ul>
<li class="git-list-item unstruck">Merge main branch into topic branch</li>
<ul>
<li class="git-list-item unstruck">git merge main -m "<i>My Message</i>"</li>
</ul>
</ol>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Daily Workflow</button>
<ol class="daily-workflow hide list">
<li class="git-list-item unstruck">git fetch upstream</li>
<li class="git-list-item unstruck">git checkout main</li>
<li class="git-list-item unstruck">git merge upstream/main</li>
<li class="git-list-item unstruck">git checkout <i>my-topic-branch</i></li>
<li class="git-list-item unstruck">git merge main -m "<i>My Message</i>"</li>
<li class="git-list-item unstruck">Work on the topic branch</li>
<li class="git-list-item unstruck">git add -A</li>
<li class="git-list-item unstruck">git commit -m "<i>My Message</i>"</li>
<li class="git-list-item unstruck">Merge work into main branch</li>
<ul>
<li class="git-list-item unstruck">git checkout main</li>
<li class="git-list-item unstruck">git merge <i>my-topic-branch-name</i> -m "<i>My Message</i>"</li>
</ul>
</ol>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Ready to Issue Pull Request</button>
<ol class="working-with-a-team hide list">
<li class="git-list-item unstruck">All code has been added, committed, and merged into the main branch</li>
<li class="git-list-item unstruck">Push main branch to GitHub remote repo</li>
<ul>
<li class="git-list-item unstruck">git push origin main</li>
</ul>
<li class="git-list-item unstruck">Issue pull request</li>
<ul>
<li class="git-list-item unstruck">Click the "Pull Request" button</li>
<li class="git-list-item unstruck">Click the "Create Pull Request" button</li>
<li class="git-list-item unstruck">Click the "New Pull Request" button</li>
<li class="git-list-item unstruck">Choose which branch you want to compare</li>
<li class="git-list-item unstruck">Check the git diff to be sure the changes are what you want</li>
<li class="git-list-item unstruck">Click the "Create Pull Request" button</li>
</ul>
</ol>
</div>
</section>
<!-- todo - add additional troubleshooting lists -->
<h2>Troubleshooting</h2>
<section class="troubleshooting-projects section-wrapper">
<div class="list-wrapper">
<button type="button" class="reveal-list">Helpful Commands</button>
<ol class="helpful-commands hide list">
<li class="git-list-item unstruck">What directory am I in?</li>
<ul>
<li class="git-list-item unstruck">pwd</li>
</ul>
<li class="git-list-item unstruck">Have my changes been added and committed?</li>
<ul>
<li class="git-list-item unstruck">git status</li>
</ul>
<li class="git-list-item unstruck">What remote repos have been added to my directory?</li>
<ul>
<li class="git-list-item unstruck">git remote -v</li>
</ul>
</ol>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Error Message</button>
<ol class="error-messages hide list">
<li class="git-list-item unstruck">Read the error message</li>
<li class="git-list-item unstruck">Check for a typo</li>
<li class="git-list-item unstruck">Google the error message</li>
<li class="git-list-item unstruck">Be very careful if the command is to remove files or folders. Something
removed in the command line is
gone-gone! π°</li>
</ol>
</div>
<div class="list-wrapper">
<button type="button" class="reveal-list">Merge Conflicts</button>
<ol class="merge-conflicts hide list">
<li class="git-list-item unstruck">Resolve merge conflicts in the text editor</li>
<li class="git-list-item unstruck">Remove all conflict markers</li>
<li class="git-list-item unstruck">git add -A</li>
<li class="git-list-item unstruck">git commit -m "<i>My Message</i>"</li>
</ol>
</div>
</section>
<h2>Resources</h2>
<section class="troubleshooting-projects section-wrapper">
<div class="resource-wrapper">
<ul>
<li><a href="https://github.com/apps/github-learning-lab" target="_blank">GitHub Learning Lab</a></li>
<li><a href="https://github.com/git-guides/" target="_blank">Git Guides</a></li>
<li><a href="https://docs.github.com/en/get-started/quickstart/hello-world" target="_blank">GitHub docs</a>
</li>
<li><a href="https://git-scm.com/book/en/v2" target="_blank">Git docs</a></li>
<li><a href="https://abookapart.com/products/git-for-humans" target="_blank">Git for Humans</a></li>
<li><a href="https://www.atlassian.com/git" target="_blank">Atlassian</a></li>
<li><a href="https://www.atlassian.com/git/tutorials" target="_blank">Atlassian Tutorials </a></li>
<li><a href="https://dangitgit.com/en" target="_blank">Dang it Git</a></li>
<li><a href="https://salferrarello.com/intermediate-git/" target="_blank">Sal Ferrarello's articles and
videos</a></li>
<li><a href="https://www.learnenough.com/command-line-tutorial" target="_blank">Learn Enough Command Line to
be
Dangerous</a></li>
<li><a href="http://marklodato.github.io/visual-git-guide/index-en.html" target="_blank">Git - A Visual
Guide</a></li>
<li><a href="https://www.smashingmagazine.com/make-life-easier-when-using-git/" target="_blank">Make Life
Easier
Using Git</a></li>
</ul>
</div>
</section>
</div>
</main>
<footer class="flex-wrapper">
<div class="content-wrapper">
<p>Copyright
<script>document.write(new Date().getFullYear())</script> | <a href="https://lscodes.com/" target="_blank"
class="site-link">Lisa Savoie</a> <img src="img/favicon.png" alt="LS Codes logo" width="16px"
class="copyright-image">
</p>
</div>
</footer>
<script src="js/vendor/modernizr-3.11.2.min.js"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
<script>
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto'); ga('set', 'anonymizeIp', true); ga('set', 'transport', 'beacon'); ga('send', 'pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async></script>
</body>
</html>