forked from CASD-EU/Seminar_Python_Git
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_en.html
More file actions
195 lines (161 loc) · 7.65 KB
/
git_en.html
File metadata and controls
195 lines (161 loc) · 7.65 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>Git at CASD</title>
<link rel="stylesheet" href="dist/reset.css"/>
<link rel="stylesheet" href="dist/reveal.css"/>
<link rel="stylesheet" href="dist/theme/dracula.css"/>
<style>
.left-align {
text-align: left;
}
</style>
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css"/>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<!--Slide 0: overview-->
<section>
<a href="https://casd.eu">
<img src="assets/CASD.png" alt="casd logo" style="
height: 250px;
margin: 0 auto 4rem auto;
background: transparent;
-webkit-filter: invert(1);
filter: invert(1);
" class="demo-logo"/>
</a>
<h3>Git at CASD</h3>
<p>
<small>Datascience team</small>
</p>
</section>
<section class="left-align">
<h3>Goals</h3>
<ul>
<li>What is git?</li>
<li>How does git work?</li>
<li>What is GitHub/Gitlab?</li>
<li>Git at CASD</li>
</ul>
</section>
</section>
<!--Slide 1: What is git?-->
<section>
<section class="left-align">
<h3>What is git?</h3>
<p><em>Git</em> is a distributed <em>version control system (VCS)</em> created by <em>Linus
Torvalds</em> in 2005 to manage the Linux kernel. The main objective of git is: </p>
<ul>
<li><em>Version control</em>: Every change is recorded with author, date, and message.</li>
<li><em>Backtracking</em>: Recover any version of any file at any time.</li>
<li><em>Collaboration</em>: Creating a "parallel universe" for your code to make changes safely</li>
</ul>
<p></p>
</section>
<section>
<h3>Key concepts in git (1)</h3>
<ul>
<li><em>Git Repository(repo)</em>: is the project folder where Git tracks all versions of your files</li>
<li><em>Working Directory</em>: The files and folders you're actively editing.</li>
<li><em>Staging Area (Index)</em>: A temporary area to preview and prepare changes before committing.</li>
<li><em>Snapshot</em>: A snapshot records all your files at a given point of time.</li>
<li><em>Commit</em>: The act of taking a snapshot with date, author, and message.</li>
</ul>
</section>
<section>
<h3>Key concepts in git (2)</h3>
<ul>
<li><em>Branch</em>: A branch is a collection of linked commits. Each repo must have at least one branch. The main branch is called <em>master</em> branch by default</li>
<li><em>Master Branch</em>: is the production-ready code version of your project </li>
<li><em>HEAD</em>: A pointer to your current branch. It represents where you are in the Git history, and where the next commit will be written</li>
<li><em>Merging Branch</em>: A temporary area to preview and prepare changes before committing.</li>
</ul>
</section>
</section>
<!--Slide 2: How does git work?-->
<section>
<section>
<h3>Git workflow</h3>
<img src="assets/git_workflow_commands.png" alt="git-workflow" style="width: 60%; height: auto;"/>
</section>
<section>
<h3>Git merge branch</h3>
<img src="assets/git-branch.png" alt="git-branch"/>
</section>
<section>
<h3>TP1</h3>
<img src="assets/git_workflow_commands_TP1.png" alt="git-workflow-tp1" style="width: 60%; height: auto;"/>
</section>
</section>
<!--Slide 3: What is github/gitlab?-->
<section>
<section class="left-align">
<h3>What is github?</h3>
<p><a href="https://github.com/">github.com</a> is the most popular web-based git repository hosting service. It adds
extra functinality on top of git (e.g. UI, pull requests, project management, etc.). There are other similar git hosting services:</p>
<ul>
<li><a href="https://about.gitlab.com/">Gitlab.com</a></li>
<li><a href="https://bitbucket.org/">Bitbucket (by Atlassian)</a> </li>
<li><a href="https://aws.amazon.com/codecommit/">AWS CodeCommit</a></li>
<li><a href="https://azure.microsoft.com/en-us/products/devops">Azure DevOps (Repos)</a></li>
</ul>
</section>
<section class="left-align">
<h3>Self-hosted web-based git repository </h3>
<p>There are many self-hosted web-based git repository solutions:</p>
<ul>
<li><em>GitLab Community Edition (CE)</em>: Full-featured web-based git repository and open source</li>
<li>Gitea: Lightweight, open source, easy to install </li>
<li>SourceHut: Modular, minimalist, fast</li>
<li>Gitprep: It is Github clone</li>
</ul>
</section>
</section>
<!--Slide 4: git at casd -->
<section>
<section >
<h3>Git at casd</h3>
<p>CASD proposes two types of remote git repository: <em>git-bare</em> and <em>self-hosted gitlab-ce server</em> </p>
<ul>
<small><li>Git Bare Repository: provided by default for all CASD projects</li></small>
<small><li>Gitlab-ce server: need to ask <em>PMS</em> for a cost estimation based on the server config</li></small>
</ul>
</section>
<section>
<h3>What is a Git Bare Repository? </h3>
<p>A bare repository is a Git repository that does not have a working directory. It only contains the <em>.git directory</em>
(i.e., the version control data), and it's typically used:</p>
<ul>
<li>As a <em>central repository</em> for collaboration (lightweight version of GitHub).</li>
<li>As a <em>continuous deployment target</em>.</li>
</ul>
</section>
<section>
<h3>TP2</h3>
<img src="assets/git_workflow_commands_TP2.png" alt="git-workflow-tp2" style="width: 60%; height: auto;"/>
</section>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealMarkdown, RevealHighlight, RevealNotes],
});
</script>
</body>
</html>