Skip to content

Commit e97ee27

Browse files
committed
Fix fixup slide to match project state
1 parent 5b7561d commit e97ee27

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

sections/making-a-change.tex

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,33 @@ \subsection{Fixup commits}
373373
\subslidetitle
374374
\begin{lstlisting}
375375
$ (*\textcolor[HTML]{0000AA}{git log --oneline}*)
376-
(*\textcolor[HTML]{ae6617}{633a534}*) change the green moon to red
377-
(*\textcolor[HTML]{ae6617}{368a328}*) remove the blue moon
376+
(*\textcolor[HTML]{ae6617}{633a534}*) add green moon
377+
(*\textcolor[HTML]{ae6617}{368a328}*) change the moon to blue
378378
\end{lstlisting}
379379

380-
Let's fix something in the 'remove the blue moon' commit.
380+
Let's add a comment to the 'change the moon to blue' commit.
381+
382+
\begin{lstlisting}
383+
$ (*\textcolor[HTML]{0000AA}{git diff}*)
384+
diff --git a/moon.js b/moon.js
385+
index 24e6080..03ef6a2 100644
386+
--- a/moon.js
387+
+++ b/moon.js
388+
(*\textcolor[HTML]{0000EE}{@@ -16,7 +16,7 @@}*) let ctx = {
389+
};
390+
// create moons
391+
(*\textcolor[HTML]{00AA00}{+}*)(*\textcolor[HTML]{00AA00}{// the moon is blue}*)
392+
new Moon("blue");
393+
new Moon("green");
394+
395+
\end{lstlisting}
396+
397+
\end{frame}
398+
399+
\subsection{Fixup commits}
400+
\begin{frame}[fragile]
401+
\subslidetitle
402+
381403
And commit that as fixup:
382404
\begin{lstlisting}
383405
git commit -a --fixup=368a328
@@ -386,9 +408,9 @@ \subsection{Fixup commits}
386408
Now our git log should look like this:
387409
\begin{lstlisting}
388410
$ (*\textcolor[HTML]{0000AA}{git log --oneline}*)
389-
(*\textcolor[HTML]{ae6617}{ca78a62}*) fixup! remove the blue moon
390-
(*\textcolor[HTML]{ae6617}{633a534}*) change the green moon to red
391-
(*\textcolor[HTML]{ae6617}{368a328}*) remove the blue moon
411+
(*\textcolor[HTML]{ae6617}{ca78a62}*) fixup! change the moon to blue
412+
(*\textcolor[HTML]{ae6617}{633a534}*) add green moon
413+
(*\textcolor[HTML]{ae6617}{368a328}*) change the moon to blue
392414
\end{lstlisting}
393415

394416
Which allows us to automatically put them in the right place in a interactive rebase.

0 commit comments

Comments
 (0)