-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgitcli.html
151 lines (136 loc) · 5.53 KB
/
gitcli.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
<!doctype html>
<html>
<head>
<title>
ACM Git Workshop: Useful Commands </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/960.css">
<script src="js/live.js"></script>
</head>
<body>
<header>
<div id="heromast">
<div class="container_12">
<div class="grid_5">
<h1><a href="index.html">Git in <br> the Habit</a></h1>
<h2><a href="index.html">Version Control Workshop</a></h2>
</div>
<div class="grid_4 push_3 event-details">
<ul>
<li>
<strong>Wednesday,</strong>
</li>
<li>
<strong>November 18th 2015</strong>
</li>
<li>2:00PM — 4:00PM</li>
<li>ECS—304</li>
</ul>
</div>
</div>
<nav>
<div class="container_12">
<ul class="grid_12">
<li><a href="index.html">Home</a></li>
<li><a href="tutorial.html">Tutorial</a></li>
<li><a href="gitcli.html">bash</a></li>
<li><a href="prereq.html">Requirements</a></li>
<li><a href="presentation.html">Presentation</a></li>
<li><a href="about.html">Info</a></li>
</ul>
</div>
</nav>
</div>
</header>
<div class="body-content">
<div class="wrapper">
<article class="container_12">
<h2 class="big-call" style="margin:10px; padding:0;">Please review the following commands</h2>
<h3 style="text-align:center; font-size:1.4em; margin:40px 0;">(Use Git Bash if on Windows)</h3>
<section class="code-section" id="pwd">
<a name="pwd"></a><p><code>pwd</code> Will output the current directory you are in.</p>
<p>So this should output, for example: (assuming you are in your home directory)</p>
<code>/Users/jake</code> <p>(or <code>/c/Users/jake</code> if you are using windows and gitbash)</p>
</section>
<section class="code-section" id="ls">
<a name="ls"></a><p><code>ls</code> Lists the files in your current directory</p>
<p>So<code>ls</code></p>
<p>Would output:</p>
<pre>
Applications Google Drive Projects pipupdate.py
Desktop Library Public test.py
Documents Movies Sites vim-stuff
Downloads Music bower_components
Dropbox Pictures myvim
</pre>
</section>
<section class="code-section" id="cd">
<a name="cd"></a><p><code>cd</code> changes the directory you are in, so it would take an argument in the directory you want to go to. <br> So... (assuming I am in my home directory)</p>
<pre>$ <code>cd Documents</code></pre>
<p>will take me into my documents directory <br>Now, if we were to want to go into a directory that was say one level above where we are we would just use <br> <code>cd ..</code><br> And, if for any reason, we needed to go back to our home folder all we would need to do is just type <code>cd</code> by itself and it will return us home.</p>
</section>
<section class="code-section" id="mkdir">
<a name="mkdir"></a><p>To make a directory First type <code>mkdir nameOfDirectory</code>, so for example:</p>
<pre>$ <code>mkdir hereBeSomeStuff</code>
</pre>
<p>Now if we <code>ls</code> we should see the new directory:</p>
<pre>
Applications Google Drive Projects myvim
Desktop Library Public pipupdate.py
Documents Movies Sites test.py
Downloads Music bower_components vim-stuff
Dropbox Pictures <strong>hereBeSomeStuff</strong>
</pre>
</section>
<section class="code-section" id="touch">
<a name="touch"></a><p>Now we will create a file using the command <code>touch</code></p>
<p>For example: <code>
touch octocat.txt
</code><br><br>Would make a new file octocat.txt inside our current directory (for this example, my home directory)<br>
Now if we <code>ls</code> we should see the new file.<br>
<pre>Applications Google Drive Projects myvim
Desktop Library Public <strong>octocat.txt</strong>
Documents Movies Sites pipupdate.py
Downloads Music bower_components test.py
Dropbox Pictures hereBeSomeStuff vim-stuff</pre></p>
</section>
<section class="code-section" id="cat">
<p>Now the command <code>cat</code> stands for concatenate, it will take the contents of a file and either output them, or concatenate them with another file and then output the result<br>For example:</p>
<pre>
dhcp-39-57-11:~ JAKE$ cat octocat.txt
here is some stuff
</pre>
<p>And..</p>
<pre>
dhcp-39-57-11:~ JAKE$ cat octocat.txt octodog.txt
here is some stuff
here is some dog stuff
</pre>
</section>
<section class="code-section" id="curl">
<p>The command <code>curl</code> in basic terms downloads files from the internet. In the context of this workshop we will be using:</p>
<p>
<pre>$ <code>curl csulbacm.github.io/acm-star-gitworkshop/resume | sh</code></pre>
</p>
</section>
</article>
</div>
</div>
<footer>
<h2 class="big-call">Brought to you by:</h2>
<div class="logo-container">
<a class="footer-logo" href="http://csulb.acm.org">
<img src="img/logos/acmlogo.png" alt="CSULB ACM Logo">
</a>
<!--
<a class="footer-logo" href="http://www.csulbsigweb.org">
<img src="img/logos/sigweblogo.png" alt="CSULB ACM Logo">
</a>
<a class="footer-logo" href="http://www.eatsociety.org">
<img src="img/logos/eatlogo.png" alt="CSULB EAT Logo">
</a>
-->
</div>
</footer>
</body>