-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
182 lines (153 loc) · 8.83 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=1024" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Git Workshop | An Introduction </title>
<meta name="description" content="Preliminary on the popular version control system presented at SUNY Albany on October 18, 2013." />
<meta name="author" content="Sankhesh Jhaveri" />
<link href="http://fonts.googleapis.com/css?family=Open+Sans:regular,semibold,italic,italicsemibold|PT+Sans:400,700,400italic,700italic|PT+Serif:400,700,400italic,700italic" rel="stylesheet" />
<link href="css/presentation_style.css" rel="stylesheet" />
</head>
<body class="impress-not-supported">
<div class="fallback-message">
<p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
<p>For the best experience please use the latest <b>Chrome</b>, <b>Safari</b> or <b>Firefox</b> browser.</p>
</div>
<div id="impress">
<div id="title" class="step" data-x="0" data-y="0" data-scale="4">
<h1>Git</h1>
<span class="try">Basic Principles</span>
<h2>Created by Sankhesh Jhaveri (<a href="https://github.com/sankhesh">@sankhesh</a>)</h2>
<h3><a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">
<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" /></a><br />
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US">
Creative Commons Attribution 3.0 Unported License</a>.</h3>
</div>
<div id="version" class="step slide" data-x="2500" data-y="1500" data-rotate="-40" align="center">
<q><b class="head">Why version control??</b></q><br/>
<img src="images/version_control.png" alt="gitk" border="0">
</div>
<div id="history" class="step imgslide" data-x="1250" data-y="1250" data-scale="0.2">
<span class="footref">Ref:<a href="http://git-scm.com/book">Pro-Git Book</a> </span>
<img class="im1" src="images/local_version_control.png" alt="local_version_control" border="0">
<img class="im2" src="images/centralized_version_control.png" alt="centralized version control" border="0">
<img class="im3" src="images/distributed_version_control.png" alt="distributed version control" border="0">
</div>
<div id="installation" class="step slide" data-x="-850" data-y="2000">
<q><b class="head">Installation</b></q><br/>
<p>Linux<br/>
<p class="code">$ sudo apt-get install git gitk</p></p><br/>
<p>Windows<br/>
<a href="http://msysgit.github.com">msysgit.github.com</a> <br/></p><br/>
<p>Mac<br/>
<a href="http://code.google.com/p/git-osx-installer">code.google.com/p/git-osx-installer</a> <br/></p>
</div>
<div id="introduce-yourself" class="step slide" data-x="-1350" data-y="2500" data-z="-200" data-rotate-x="-40" data-rotate-y="10" data-scale="2">
<q><b class="head push">Introduce yourself</b></q><br/>
<p class="code tp">$ git config --global user.name "Your Name"<br/>
$ git config --global user.email [email protected]</p><br/>
<b class="pull">Check Configuration<br/><br/></b>
<p class="code tp">$ git config --list</p><br/>
<b class="pull">Getting help<br/><br/></b>
<p class="code tp">$ git help</p>
</div>
<div id="in-a-nutshell" class="step slide" data-x="3000" data-y="3000" data-scale="1">
<q><b class="head push">In a nutshell</b></q><br/>
<img src="images/in_a_nutshell.png" alt="Git in a nutshell" border="0">
</div>
<div id="hash-object" class="step slide" data-x="250" data-y="1500" data-scale="0.5" data-z="400">
<q><b class="head">SHA-1 sum</b></q><br/>
<p class="code">$ echo 'Hello, world!' > greeting<br/><br/>
$ git hash-object greeting<br/>
af5626b4a114abcb82d63db7c8082c3c4756e51b</p><br/>
<ul class="bulletlist">
<li>160-bit 40-character unique id</li>
<li>Identify changes in data</li>
<li>Same data will always be represented by the same object (blob)</li>
</ul>
</div>
<div id="clone" class="step slide" data-x="4000" data-y="2000" data-scale="2">
<q><b class="head">Cloning an existing repository</b></q><br/>
<p class="code">$ git clone git://github.com/ASIST-SUNY-Albany/Git-Workshop-2013.git myRepo<br/><br/>
$ git clone https://github.com/ASIST-SUNY-Albany/Git-Workshop-2013.git myRepo<br/><br/>
$ git clone [email protected]:ASIST-SUNY-Albany/Git-Workshop-2013.git myRepo<br/><br/></p>
</div>
<div id="undo" class="step slide" data-x="1500" data-y="2000" data-scale="1">
<q><b class="head push">Undoing things</b></q><br/>
<b class="pull">Amend Last commit<br/><br/></b>
<p class="code tp">$ git commit --amend</p><br/>
<b class="pull">Unstaging a staged file<br/><br/></b>
<p class="code tp">$ git reset HEAD filename</p><br/>
<b class="pull">Unmodifying a modified file<br/><br/></b>
<p class="code tp">$ git checkout -- filename</p>
</div>
<div id="blame" class="step slide" data-x="1750" data-y="3000" data-scale="1">
<span class="footref">Ref:<a href="http://git-scm.com/book">Pro-Git Book</a> </span>
<q><b class="head">Blame</b></q><br/>
<p class="code">$ git blame filename</p><br/>
<img src="images/blame.png" alt="git blame" border="0">
</div>
<div id="branching" class="step slide" data-x="200" data-y="2250" data-scale="1">
<span class="footref">Ref:<a href="http://git-scm.com/book">Pro-Git Book</a> </span>
<q><b class="head">Branching</b></q><br/>
<p class="code">$ git checkout -b iss53</p><br/>
<img src="images/branching.png" alt="git branching" border="0">
</div>
<div id="merging" class="step slide" data-x="200" data-y="3250" data-scale="1">
<span class="footref">Ref:<a href="http://git-scm.com/book">Pro-Git Book</a> </span>
<q><b class="head">Merging</b></q><br/>
<p class="code">$ git checkout master<br/>
$ git merge iss53</p><br/>
<img src="images/merging.png" alt="git merging" border="0">
</div>
<div id="merge-conflict" class="step slide" data-x="4000" data-y="1000" data-z="2000">
<q><b class="head">Something wrong??</b></q><br/>
<p class="code">$ git merge iss53<br/>
Auto-merging merging.txt<br/>
CONFLICT (content): Merge conflict in merging.txt<br/>
Automatic merge failed; fix conflicts and then commit the result.</p>
<p><br/></p>
<p class="code"><<<<<<< HEAD:merging.txt<br/>
Here is the original change.<br/>
=======<br/>
Here is the modified change.<br/>
>>>>>>> iss53:merging.txt</p>
</div>
<div id="rebase" class="step slide" data-x="4250" data-y="3000" data-scale="1">
<span class="footref">Ref::<a href="http://git-scm.com/book">Pro-Git Book</a> </span>
<q><b class="head">Rebase</b></q><br/>
<p class="code">$ git checkout experiment<br/>
$ git rebase master<br/></p>
<img src="images/rebasing.png" alt="git rebase" border="0">
</div>
<div id="trivia" class="step slide" data-x="5500" data-y="3000" data-scale="1">
<q><b class="head">Trivia Time</b></q><br/>
<li> Git & Binary Files? </li><br/>
<li> Do you have to use Vim as the editor? </li><br/>
<li> Are you restricted to a single remote repository?</li><br/>
</div>
<div id="resources" class="step slide" data-x="5400" data-y="1800" data-rotate="-90">
<q><b class="head">Additional Resources</b></q><br/>
<li><a href="http://try.github.com">Github | Try Git in your browser</a></li>
<li><a href="https://git.wiki.kernel.org/index.php/GitDocumentation">Git Documentation</a></li>
<li><a href="http://git-scm.com/book">Pro-Git Book</a></li>
<li><a href="http://gitref.org/">Git Reference</a></li>
<li><a href="http://marklodato.github.io/visual-git-guide/index-en.html">A Visual Git Reference</a></li>
<li><a href="http://pcottle.github.io/learnGitBranching/">Learn Git Branching</a></li>
<div id="overview" class="step" data-x="3000" data-y="1500" data-scale="7">
</div>
</div>
<div class="hint">
<p>Use a spacebar or arrow keys to navigate</p>
</div>
<script>
if ("ontouchstart" in document.documentElement) {
document.querySelector(".hint").innerHTML = "<p>Tap on the left or right to navigate</p>";
}
</script>
<script src="js/impress.js"></script>
<script>impress().init();</script>
</body>
</html>