-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion-control.html
More file actions
290 lines (248 loc) · 17.3 KB
/
version-control.html
File metadata and controls
290 lines (248 loc) · 17.3 KB
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
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title> 3 | Version Control | Osburn Lab Protocols</title>
<meta name="description" content="This is a collection of protocols for the Osburn Lab." />
<meta name="generator" content="bookdown 0.19 and GitBook 2.6.7" />
<meta property="og:title" content=" 3 | Version Control | Osburn Lab Protocols" />
<meta property="og:type" content="book" />
<meta property="og:description" content="This is a collection of protocols for the Osburn Lab." />
<meta name="github-repo" content="rstudio/osburnlab/protocols" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content=" 3 | Version Control | Osburn Lab Protocols" />
<meta name="twitter:description" content="This is a collection of protocols for the Osburn Lab." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="prev" href="data-access.html"/>
<link rel="next" href="create-a-protocol.html"/>
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
<style type="text/css">
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
{ position: relative; left: -4em; }
pre.numberSource a.sourceLine::before
{ content: attr(title);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
}
pre.numberSource { margin-left: 3em; padding-left: 4px; }
div.sourceCode
{ color: #cccccc; background-color: #303030; }
@media screen {
a.sourceLine::before { text-decoration: underline; }
}
code span.al { color: #ffcfaf; } /* Alert */
code span.an { color: #7f9f7f; font-weight: bold; } /* Annotation */
code span.at { } /* Attribute */
code span.bn { color: #dca3a3; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #f0dfaf; } /* ControlFlow */
code span.ch { color: #dca3a3; } /* Char */
code span.cn { color: #dca3a3; font-weight: bold; } /* Constant */
code span.co { color: #7f9f7f; } /* Comment */
code span.cv { color: #7f9f7f; font-weight: bold; } /* CommentVar */
code span.do { color: #7f9f7f; } /* Documentation */
code span.dt { color: #dfdfbf; } /* DataType */
code span.dv { color: #dcdccc; } /* DecVal */
code span.er { color: #c3bf9f; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #c0bed1; } /* Float */
code span.fu { color: #efef8f; } /* Function */
code span.im { } /* Import */
code span.in { color: #7f9f7f; font-weight: bold; } /* Information */
code span.kw { color: #f0dfaf; } /* Keyword */
code span.op { color: #f0efd0; } /* Operator */
code span.ot { color: #efef8f; } /* Other */
code span.pp { color: #ffcfaf; font-weight: bold; } /* Preprocessor */
code span.sc { color: #dca3a3; } /* SpecialChar */
code span.ss { color: #cc9393; } /* SpecialString */
code span.st { color: #cc9393; } /* String */
code span.va { } /* Variable */
code span.vs { color: #cc9393; } /* VerbatimString */
code span.wa { color: #7f9f7f; font-weight: bold; } /* Warning */
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
<link rel="stylesheet" href="font-awesome.min.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li>
<a href="./">
<img class="logo" src="images/LabLogo_White-01.png" height="50">
</a>
</li>
<li class="divider"></li>
<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> | About</a></li>
<li class="chapter" data-level="2" data-path="data-access.html"><a href="data-access.html"><i class="fa fa-check"></i><b>2</b> | Data Access + Storage</a><ul>
<li class="chapter" data-level="2.1" data-path="data-access.html"><a href="data-access.html#macos-users"><i class="fa fa-check"></i><b>2.1</b> MacOS Users</a></li>
<li class="chapter" data-level="2.2" data-path="data-access.html"><a href="data-access.html#windows-users"><i class="fa fa-check"></i><b>2.2</b> Windows Users</a></li>
</ul></li>
<li class="chapter" data-level="3" data-path="version-control.html"><a href="version-control.html"><i class="fa fa-check"></i><b>3</b> | Version Control</a></li>
<li class="chapter" data-level="4" data-path="create-a-protocol.html"><a href="create-a-protocol.html"><i class="fa fa-check"></i><b>4</b> | Create a Protocol</a></li>
<li class="chapter" data-level="5" data-path="qiime2-workflow.html"><a href="qiime2-workflow.html"><i class="fa fa-check"></i><b>5</b> | Qiime2 workflow</a><ul>
<li class="chapter" data-level="5.1" data-path="qiime2-workflow.html"><a href="qiime2-workflow.html#import-data"><i class="fa fa-check"></i><b>5.1</b> Import data</a></li>
<li class="chapter" data-level="5.2" data-path="qiime2-workflow.html"><a href="qiime2-workflow.html#demultiplexing"><i class="fa fa-check"></i><b>5.2</b> Demultiplexing</a></li>
<li class="chapter" data-level="5.3" data-path="qiime2-workflow.html"><a href="qiime2-workflow.html#denoising-and-asv-generation"><i class="fa fa-check"></i><b>5.3</b> Denoising and ASV generation</a></li>
<li class="chapter" data-level="5.4" data-path="qiime2-workflow.html"><a href="qiime2-workflow.html#taxonomy"><i class="fa fa-check"></i><b>5.4</b> Taxonomy</a></li>
<li class="chapter" data-level="5.5" data-path="qiime2-workflow.html"><a href="qiime2-workflow.html#taxa-barplots-and-diversity-analyses-in-qiime2"><i class="fa fa-check"></i><b>5.5</b> Taxa barplots and diversity analyses in Qiime2</a></li>
</ul></li>
<li class="chapter" data-level="6" data-path="quest-tutorial.html"><a href="quest-tutorial.html"><i class="fa fa-check"></i><b>6</b> | Quest tutorial</a><ul>
<li class="chapter" data-level="6.1" data-path="quest-tutorial.html"><a href="quest-tutorial.html#getting-acquainted-with-quest"><i class="fa fa-check"></i><b>6.1</b> Getting acquainted with Quest</a></li>
<li class="chapter" data-level="6.2" data-path="quest-tutorial.html"><a href="quest-tutorial.html#using-qiime2-on-quest"><i class="fa fa-check"></i><b>6.2</b> Using Qiime2 on Quest</a></li>
<li class="chapter" data-level="6.3" data-path="quest-tutorial.html"><a href="quest-tutorial.html#best-practices-in-a-shared-computing-environment"><i class="fa fa-check"></i><b>6.3</b> Best practices in a shared computing environment</a></li>
<li class="chapter" data-level="6.4" data-path="quest-tutorial.html"><a href="quest-tutorial.html#interactive-jobs-on-quest"><i class="fa fa-check"></i><b>6.4</b> Interactive jobs on Quest</a></li>
<li class="chapter" data-level="6.5" data-path="quest-tutorial.html"><a href="quest-tutorial.html#batch-jobs-on-quest"><i class="fa fa-check"></i><b>6.5</b> Batch jobs on Quest</a></li>
<li class="chapter" data-level="6.6" data-path="quest-tutorial.html"><a href="quest-tutorial.html#a-note-on-partitions"><i class="fa fa-check"></i><b>6.6</b> A note on partitions</a></li>
<li class="chapter" data-level="6.7" data-path="quest-tutorial.html"><a href="quest-tutorial.html#more-information"><i class="fa fa-check"></i><b>6.7</b> More information</a></li>
</ul></li>
<li class="chapter" data-level="7" data-path="DAPI.html"><a href="DAPI.html"><i class="fa fa-check"></i><b>7</b> | DAPI + Cell Counting</a><ul>
<li class="chapter" data-level="7.1" data-path="DAPI.html"><a href="DAPI.html#sample-prep"><i class="fa fa-check"></i><b>7.1</b> Sample prep</a></li>
<li class="chapter" data-level="7.2" data-path="DAPI.html"><a href="DAPI.html#operating-the-microscope"><i class="fa fa-check"></i><b>7.2</b> Operating the Microscope</a></li>
<li class="chapter" data-level="7.3" data-path="DAPI.html"><a href="DAPI.html#cell-counting"><i class="fa fa-check"></i><b>7.3</b> Cell Counting</a></li>
<li class="chapter" data-level="7.4" data-path="DAPI.html"><a href="DAPI.html#troubleshooting"><i class="fa fa-check"></i><b>7.4</b> Troubleshooting</a></li>
</ul></li>
<li class="chapter" data-level="8" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html"><i class="fa fa-check"></i><b>8</b> | Submit Sequence Data</a><ul>
<li class="chapter" data-level="8.1" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#new-submission"><i class="fa fa-check"></i><b>8.1</b> New Submission</a></li>
<li class="chapter" data-level="8.2" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#subission-type"><i class="fa fa-check"></i><b>8.2</b> 1 Subission Type</a></li>
<li class="chapter" data-level="8.3" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#submitter"><i class="fa fa-check"></i><b>8.3</b> 2 Submitter</a></li>
<li class="chapter" data-level="8.4" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#sequencing-technology"><i class="fa fa-check"></i><b>8.4</b> 3 Sequencing Technology</a></li>
<li class="chapter" data-level="8.5" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#sequences"><i class="fa fa-check"></i><b>8.5</b> 4 Sequences</a></li>
<li class="chapter" data-level="8.6" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#sequence-processing"><i class="fa fa-check"></i><b>8.6</b> 5 Sequence Processing</a></li>
<li class="chapter" data-level="8.7" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#source-info"><i class="fa fa-check"></i><b>8.7</b> 6 Source Info</a></li>
<li class="chapter" data-level="8.8" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#bioproject-info"><i class="fa fa-check"></i><b>8.8</b> 7 BioProject Info</a></li>
<li class="chapter" data-level="8.9" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#biosample-type"><i class="fa fa-check"></i><b>8.9</b> 8 BioSample Type</a></li>
<li class="chapter" data-level="8.10" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#biosample-attributes"><i class="fa fa-check"></i><b>8.10</b> 9 BioSample Attributes</a></li>
<li class="chapter" data-level="8.11" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#references"><i class="fa fa-check"></i><b>8.11</b> 10 References</a></li>
<li class="chapter" data-level="8.12" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#review-submit"><i class="fa fa-check"></i><b>8.12</b> 11 Review & Submit</a></li>
<li class="chapter" data-level="8.13" data-path="submit-sequence-data.html"><a href="submit-sequence-data.html#correcting-submission"><i class="fa fa-check"></i><b>8.13</b> Correcting Submission</a></li>
</ul></li>
<li class="chapter" data-level="9" data-path="metabolic.html"><a href="metabolic.html"><i class="fa fa-check"></i><b>9</b> | Functional Gene Annotation with METABOLIC</a></li>
<li class="divider"></li>
<li class="social">
<a target="blank" href="https://github.com/osburnlab" class="icon fa-github"></a>
<a target="blank" href="https://twitter.com/osburnlab" class="icon fa-twitter"></a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Osburn Lab Protocols</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="version-control" class="section level1">
<h1><span class="header-section-number"> 3</span> | Version Control</h1>
<p><font size="1"><strong>Created by:</strong> Caitlin Casar on 2019-10-16 </br>
<strong>Last updated:</strong> 2019-10-16 </font></p>
<p>If you’re writing code, it’s very important to implement version control with Git. This guide will get you started!</p>
<p>First you’ll need to <a href="https://www.linode.com/docs/development/version-control/how-to-install-git-on-linux-mac-and-windows/">install Git</a>.</p>
<p>Next, create an account on <a href="https://github.com">Github</a>. If you want access to provate repositories (i.e. if you need to backup unpublished data or code), be sure to set up a student account.</p>
<p>Now, you’ll need to set your credentials in Git. Open up your terminal.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb2-1" title="1"><span class="co">#set your user name on github</span></a>
<a class="sourceLine" id="cb2-2" title="2"><span class="fu">git</span> config --global user.name <span class="st">"John Doe"</span></a>
<a class="sourceLine" id="cb2-3" title="3"></a>
<a class="sourceLine" id="cb2-4" title="4"><span class="co">#set your user email on github</span></a>
<a class="sourceLine" id="cb2-5" title="5"><span class="fu">git</span> config --global user.email johndoe@example.com</a></code></pre></div>
<p>Now, go to Github and create a repository for your code.</p>
<p><img src="images/git-1.png" width="1334" /></p>
<p>If you want this repository to be private, change the repo settings on Githib. Click on the settings button.
<img src="images/git-2.png" width="1320" /></p>
<p>Then set the reposotory to private.
<img src="images/git-3.png" width="972" /></p>
<p>Then clone this repository to your computer. You may be prompted to enter your Github password.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb3-1" title="1"><span class="co">#change directories to the desired location for your repository</span></a>
<a class="sourceLine" id="cb3-2" title="2"><span class="bu">cd</span> ~/Desktop</a>
<a class="sourceLine" id="cb3-3" title="3"></a>
<a class="sourceLine" id="cb3-4" title="4"><span class="co">#clone your repository using the URL </span></a>
<a class="sourceLine" id="cb3-5" title="5"><span class="fu">git</span> clone https://github.com/OsburnLab/Protocols</a></code></pre></div>
<p>Now you can add your code files to this cloned repository. When you’re done editing your code, push it up to the Github server.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb4-1" title="1"><span class="co">#add your new files to the queue</span></a>
<a class="sourceLine" id="cb4-2" title="2"><span class="fu">git</span> add .</a>
<a class="sourceLine" id="cb4-3" title="3"></a>
<a class="sourceLine" id="cb4-4" title="4"><span class="co">#commit your changes and add a short description</span></a>
<a class="sourceLine" id="cb4-5" title="5"><span class="fu">git</span> commit -a -m <span class="st">"short description here"</span></a>
<a class="sourceLine" id="cb4-6" title="6"></a>
<a class="sourceLine" id="cb4-7" title="7"><span class="co">#push your changes to the Github server</span></a>
<a class="sourceLine" id="cb4-8" title="8"><span class="fu">git</span> push </a></code></pre></div>
</div>
</section>
</div>
</div>
</div>
<a href="data-access.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="create-a-protocol.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": null,
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": "https://github.com/OsburnLab/Protocols/edit/master/02-version-control.Rmd",
"text": "Edit"
},
"history": {
"link": null,
"text": null
},
"view": {
"link": null,
"text": null
},
"download": ["bookdown-demo.pdf", "bookdown-demo.epub"],
"toc": {
"collapse": "subsection"
}
});
});
</script>
</body>
</html>