-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebase-workflow.tex
289 lines (234 loc) · 7.08 KB
/
rebase-workflow.tex
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
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{utopia} %font utopia imported
\usepackage{tipa}
\usepackage{ragged2e}
\usetheme{Madrid}
\usecolortheme{default}
%------------------------------------------------------------
%This block of code defines the information to appear in the
%Title page
\title[Git Rebase Workflow] %optional
{Git Rebase Workflow}
\subtitle{Demo Day}
\date[KS 2024] % (optional)
{September 2024}
\logo{\includegraphics[height=0.8cm]{pictures/prodigy-logo-600x162.png}}
%End of title page configuration block
%------------------------------------------------------------
%------------------------------------------------------------
%The next block of commands puts the table of contents at the
%beginning of each section and highlights the current section:
\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents[currentsection]
\end{frame}
}
%------------------------------------------------------------
\begin{document}
%The next statement creates the title page.
\frame{\titlepage}
%---------------------------------------------------------
%This block of code is for the table of contents after
%the title page
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents
\end{frame}
%---------------------------------------------------------
%---------------------------------------------------------
\section{What's a Github?}
\begin{frame}
\frametitle{What's a Github?}
\begin{center}
\includegraphics[height=5cm]{pictures/github.jpg}
\end{center}
\end{frame}
\begin{frame}
\frametitle{What's a version control?}
\begin{block}{version control [v\textschwa rZH\textschwa n k\textschwa n'trōl] \textit{noun}}
records changes to a file or set of files and allows you to recall the specific version of the file you want later
\end{block}
\pause \begin{columns}[T]
\column{\dimexpr0.5\paperwidth-20pt}
Pros
\begin{itemize}
\item multiple people can work on the same files
\item can restore to backup if you made a boo boo
\item see exactly what was changed, when and by who
\end{itemize}
\column{\dimexpr0.5\paperwidth}
\pause Cons
\begin{itemize}
\item Nothing :$\wedge$)
\pause \item a little bit of a learning curve :$\wedge$(
\end{itemize}
\end{columns}
\end{frame}
%---------------------------------------------------------
%---------------------------------------------------------
\section{Merge Workflow}
\begin{frame}
\frametitle{Typical Merge Flow}
\begin{columns}
\column{\dimexpr\paperwidth+20pt}
\includegraphics[width=\paperwidth]{pictures/merge_flow.png}
\end{columns}
\vspace{0.3cm}
\begin{columns}
\column{0.33\textwidth}
Start working on a new feature
\column{0.36\textwidth}
Check in your changes to a Git repository
\column{0.33\textwidth}
Finish feature and bring changes in to master
\end{columns}
\end{frame}
\begin{frame}
\frametitle{Typical Merge Flow - Solo Developer}
\begin{columns}
\column{0.5\textwidth}
\includegraphics[scale=0.05]{pictures/1_dev.jpg}
\column{0.3\textwidth}
\begin{itemize}
\item commit directly to master
\item no conflicts
\item no wait time for merging
\end{itemize}
\end{columns}
\end{frame}
\begin{frame}
\frametitle{Typical Merge Flow - Solo Developer Git History}
\includegraphics[scale=0.18]{pictures/solo_git.png}
\end{frame}
\begin{frame}
\frametitle{Typical Merge Flow - 2-4 Developers}
\begin{columns}
\column{0.5\textwidth}
\includegraphics[scale=0.05]{pictures/2_dev.jpg}
\column{0.3\textwidth}
\begin{itemize}
\item start to use branching strategy
\item start to see conflicts
\item need to wait between merges
\item git history gets more complex, but manageable
\end{itemize}
\end{columns}
\end{frame}
\begin{frame}
\frametitle{Typical Merge Flow - 2-4 Developers Git History}
\includegraphics[scale=0.15]{pictures/more_solo_git.png}
\end{frame}
\begin{frame}
\frametitle{Typical Merge Flow - 5+ Developers}
\begin{columns}
\column{0.5\textwidth}
\includegraphics[scale=0.05]{pictures/5_dev.jpg}
\column{0.3\textwidth}
\begin{itemize}
\item lots of branches
\item start to see conflicts
\item one developer dedicated to merging
\end{itemize}
\end{columns}
\end{frame}
\begin{frame}
\frametitle{Typical Merge Flow - 5+ Developers Git History}
\begin{center}
\includegraphics[scale=0.25]{pictures/no.jpg}
\end{center}
\end{frame}
\begin{frame}
\frametitle{nonononononononononononononononon stahp STAHP}
\begin{center}
\includegraphics[scale=1.4]{pictures/thisisfine.jpg}
\end{center}
\end{frame}
%---------------------------------------------------------
%---------------------------------------------------------
\section{Rebase Workflow}
\begin{frame}
\frametitle{What do?}
\begin{block}{Solution}
\begin{itemize}
\item \texttt{git pull --rebase origin master}
\item \texttt{git rebase -i origin/master}
\end{itemize}
\end{block}
\pause \begin{itemize}
\item Creates a linear history
\item Easy to handle product release, backporting and release
\item Conflicts are solved by one developer, and everyone else gets resolutions for free (mostly)
\item Proven to scale, as proven by all large open source projects
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Rebase Flow - Taste the Teamwork}
\begin{center}
\begin{columns}
\column{\dimexpr\paperwidth+20pt}
\includegraphics[width=\paperwidth]{pictures/nice.png}
\end{columns}
\end{center}
\end{frame}
\begin{frame}
\frametitle{What's the Difference, Actually?}
\begin{center}
\begin{columns}
\column{\dimexpr\paperwidth+20pt}
\includegraphics[width=\paperwidth]{pictures/merge_or_rebase.png}
\end{columns}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Rebase Flow}
\begin{center}
\begin{columns}[c]
\column{\dimexpr\paperwidth+20pt}
\includegraphics[width=\paperwidth]{pictures/rebase_workflow.png}
\end{columns}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Only You Can Prevent Forest Fires}
\begin{center}
\includegraphics[scale=0.2]{pictures/destruction.jpg}
\end{center}
\end{frame}
%---------------------------------------------------------
\section{Pre-Demo Warmup}
\begin{frame}
\frametitle{Recap Git Fundamentals}
\begin{block}{what am I doing?}
\begin{itemize}
\item \texttt{git branch}
\item \texttt{git status}
\item \texttt{git diff}
\item \texttt{gitk --all}
\end{itemize}
\end{block}
\begin{block}{making changes}
\begin{itemize}
\item \texttt{git checkout}
\item \texttt{git commit}
\item \texttt{git push}
\end{itemize}
\end{block}
\begin{block}{rewriting history}
\begin{itemize}
\item \texttt{git pull --rebase}
\item \texttt{git rebase -i}
\item \texttt{git remote prune origin}
\end{itemize}
\end{block}
\end{frame}
\begin{frame}
\frametitle{TEAM?!}
\begin{center}
{\Huge Thank you}
(demo time?)
\end{center}
\end{frame}
\end{document}