Skip to content

Commit 253f93d

Browse files
committed
Minor updates for 2018
1 parent fc9634a commit 253f93d

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

basicbasics.tex

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,16 @@ \section{The basic basics}
7070
\end{block}
7171

7272
\begin{block}{Commit}
73-
A basic unit of work in a project. Contains the set of changes, a textual description of what these changes do, a reference to the previous state (the \textit{parent commit}), and the author name and date.\\ \smallskip Finally, the commit contains an alphanumeric identifier (SHA-1 hash), generated from the above information, which is used to uniquely identify the commit. \\For example: \textcolor{Maroon}{\texttt{bdfa760c07d8f621ff603a2dc5d6de810cd62e88}}
73+
A basic unit of work in a project. Contains a \textbf{snapshot} of the complete project, a reference to a previous snapshot (the \textit{parent commit}), the commit message -- a textual description of the changes in the commit (with respect to the parent commit), the commit author name, and the commit date.
74+
\end{block}
75+
\end{frame}
76+
77+
\begin{frame}
78+
79+
\frametitle{Commit ID (SHA)}
80+
\begin{block}{Commit ID}
81+
82+
\smallskip Every commit is marked with an alphanumeric identifier (SHA-1 hash) generated from the above information, which is used to uniquely identify the commit. \\For example: \textcolor{Maroon}{\texttt{bdfa760c07d8f621ff603a2dc5d6de810cd62e88}}
7483
\smallskip
7584

7685
You can also use a prefix of the identifier to refer to this commit, usually 5 or 7 characters long, e.g. \textcolor{Maroon}{\texttt{bdfa760}}.
@@ -84,11 +93,13 @@ \section{The basic basics}
8493
\frametitle{Basic terms: branch, master and head}
8594

8695
\begin{block}{Branch, master and head}
87-
A \alert{branch} is simply a pointer to a commit. \alert{Master} is the name of the default branch. \alert{Head} is a pointer to the last commit in the currently active (checked out) branch.
96+
A \alert{branch} is simply a pointer to a commit. \alert{Master} is usually the name of the main branch (but does not have to be). \alert{HEAD} is a special pointer to the currently checked out commit. \\
97+
\smallskip
98+
The commits with their parent-child relationships form a directed acyclic graph (DAG).
8899
\end{block}
89100

90101
\begin{figure}
91-
\includegraphics[scale=0.3]{branches}
102+
\includegraphics[scale=0.26]{branches}
92103
\end{figure}
93104

94105
\end{frame}
@@ -148,14 +159,17 @@ \section{The basic basics}
148159
\begin{block}{Cloning}
149160
Cloning creates a local copy of the repository, which includes all the commits in the repository -- the whole history.
150161
\begin{minted}{console}
151-
> git clone [email protected]:<you>/git-tutorial-code.git
162+
> git clone [email protected]:<mirko>/git-tutorial-code.git
152163
\end{minted}
153164
\end{block}
154165

155166
\begin{block}{Task D [Mirko, Slavko]}
156167
Clone Mirko's repository onto your computer.
157168
\end{block}
158169

170+
\begin{itemize}
171+
\item NB -- if you committed something, it is in your local repo, (almost) permanently. Do not make it a habit to delete your local repositories -- if you "lose" a commit, it can be recovered (by its ID), even if you have deleted the branch!
172+
\end{itemize}
159173

160174
\end{frame}
161175

@@ -175,7 +189,7 @@ \section{The basic basics}
175189

176190
\begin{itemize}
177191
\item The \textit{working tree} -- current version of files ("checked out")
178-
\item The hidden \texttt{.git} folder which contains repository metadata \\ (all the commits, and the internal structures for storing them)
192+
\item The hidden \texttt{.git} folder which contains repository metadata \\ (all the commits)
179193
\item The \texttt{git status} command provides an overview of what is going on in the git repository.
180194
\end{itemize}
181195
\begin{minted}{console}
@@ -339,12 +353,12 @@ \section{The basic basics}
339353
> git reset --hard
340354
\end{minted}
341355

342-
\item This will restore all tracked files in the working tree to the most recently committed version (this commit is also known as the \texttt{HEAD} commit).
356+
\item This will restore all tracked files in the working tree to the most recently committed version (i.e. the \texttt{HEAD} commit).
343357
\end{itemize}
344358

345359
\begin{block}{Task I [Mirko, Slavko]: Discarding several unwanted changes}
346360
\begin{itemize}
347-
\item Delete several files from the cloned example repository. Do not add or commit the changes.
361+
\item Delete several files from the cloned example repository. Do not commit the changes.
348362
\item Check the output of \texttt{git status}.
349363
\item Discard all changes as shown above.
350364
\end{itemize}

larics-git-tutorial-intro.tex

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@
5151

5252
%%% --------------------------------------------------------------
5353
\title[git basics]
54-
{LARICS git tutorial: basics}
54+
{LARICS git tutorial}
5555

5656
\author[Or\v{s}uli\'{c}, Mikli\'{c}]{Juraj Or\v{s}uli\'{c}, Damjan Mikli\'{c}}
5757

5858
\institute[LARICS]{LARICS Lab\\FER, University of Zagreb}
5959

60-
\date[]{April 2017}
60+
\date[]{December 2018}
6161

6262
%\AtBeginSection[]
6363
%{
@@ -124,18 +124,11 @@ \section{Where to go from here?}
124124
% ----------------------------------------------------------------
125125

126126
\begin{frame}
127-
\frametitle{Some other topics to think about}
128-
129127
\begin{itemize}
130-
\item Using git on Windows
131-
\item Setting up access to local git repos for other developers
132-
\item git submodules
128+
\item Super cool simulation for practicing advanced git branching: \\ \href{https://learngitbranching.js.org} {https://learngitbranching.js.org}
129+
\item If you have any questions, feel free to send an email to
130+
\href{mailto:[email protected]}{[email protected]}, or drop by LARICS (C-XI-16).
133131
\end{itemize}
134-
135-
If you have any questions, feel free to send an email to
136-
137-
\href{mailto:[email protected]}{[email protected]}, or visit us in C-XI-16!
138-
139132
\end{frame}
140133

141134
% ================================================================

0 commit comments

Comments
 (0)