-
Notifications
You must be signed in to change notification settings - Fork 0
/
commit.tex
91 lines (61 loc) · 2.04 KB
/
commit.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
% This is part of the ``Git First Step''.
% Copyright 2014, 2020 Yoshida Shin.
% See the file slide.tex for copying conditions.
\begin{frame}[t]{commit}{使ってみる}
cached を repository に反映
\vspace{2ex}
\$ git commit -m 'Add a and b.'
\end{frame}
\begin{frame}[t]{中で起きている事}{使ってみる}
\begin{columns}
\begin{narrowcolumn}
\begin{block}{workspace}
a b c
\end{block}
\begin{block}{cached (index)}
a b
\end{block}
\end{narrowcolumn}
\begin{halfcolumn}
\begin{repository}{repository}
\onslide<3->{
\node (c1) [commit, rectangle split, rectangle split parts=3] at (0em, 0ex) {
\commitmessage{Add a and b.}
\nodepart{second}{a b}
\nodepart{third}{master\onslide*<4->{{\HEAD}}}
};
}
\onslide*<2>{
\node (c1) [commit, rectangle split, rectangle split parts=2] at (0em, 0ex) {
\commitmessage{Add a and b.}
\nodepart{second}{a b}
};
}
\end{repository}
\end{halfcolumn}
\end{columns}
\vspace{2ex}
\$ git commit -m 'Add a and b.'
\vspace{2ex}
\onslide*<-2>{cached を取り込み、message を添えて commit を作成}
\onslide*<3>{
また、初回 commit 時のみ master branchを作成
(branch: commit へのリンクの様な物)
}
\onslide*<4>{
最初、HEAD は master へ向いている
(HEAD: repository 内の現在の commit を指すリンクの様な物)
(この場合、HEAD はリンクのリンクとなる)
}
\end{frame}
\begin{frame}[t]{git commit コマンド補足}{}
\begin{itemize}
\item git commit
でエディタが立ち上がり、そこで commit message を入力すると新 commit が作成される
\vspace{2ex}
\item git commit -m \textit{message}
でエディタを立ち上げずに commit message を指定する事も可能
\vspace{2ex}
\item message の無い commit を作成する事はできない
\end{itemize}
\end{frame}