Commit bcaf26d4 authored by Mihai's avatar Mihai

Switch to svg for remotes images

parent 0eaaa421
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -44,34 +44,44 @@
\item A repository can be on a server, your desktop, your coworker's
laptop, etc.
\item Technically, no repository is `special'.
\item We call a reference to another repository a {\em remote}.
\item We call a reference to another repository a \cmdarg{remote}.
\end{itemize}
\bigskip
\pause
\end{pframe}
\includegraphics[width=5cm]{repositories}
\begin{pframe}
\begin{center}
\includegraphics[width=\textwidth]{images/remotes_00.pdf}
\end{center}
\end{pframe}
\subsection{Listing remotes}
\begin{pframe}
\begin{framed}
\prompt\ \gitcmd\ \cmd{remote} \\
\cliout{gitlab}
\cmdarg{gitlab}
\end{framed}
We are on \lstinline{aida} and have one remote, \lstinline{gitlab}, defined.
\pause
We are on \cmdarg{aida} and have one remote, \cmdarg{gitlab}, defined.
\end{pframe}
\begin{pframe}
\begin{center}
\includegraphics[width=\textwidth]{images/remotes_01.pdf}
\end{center}
\end{pframe}
\begin{pframe}
\begin{framed}
\prompt\ \gitcmd\ \cmd{remote} \cmdopt{-v}\\
\small{
\cliout{gitlab https://git.lumc.nl/zorro/tv-series.git (fetch)}\\
\cliout{gitlab https://git.lumc.nl/zorro/tv-series.git (push)}}
\cmdarg{gitlab} \cliout{https://git.lumc.nl/zorro/tv-series.git (fetch)}\\
\cmdarg{gitlab} \cliout{https://git.lumc.nl/zorro/tv-series.git (push)}}
\end{framed}
\cmdopt{-v}: Include remote location.
We see that communication with \lstinline{gitlab} is over HTTPS.
We see that communication with \cmdarg{gitlab} is over HTTPS.
\end{pframe}
\subsection{Adding a remote: \texttt{git remote add}}
......@@ -87,13 +97,19 @@
\begin{framed}
\prompt\ \gitcmd\ \cmd{remote} \cmdopt{-v}\\
\small{
\cliout{gitlab https://git.lumc.nl/zorro/tv-series.git (fetch)}\\
\cliout{gitlab https://git.lumc.nl/zorro/tv-series.git (push)}\\
\cliout{hue 192.168.0.8:docs/tv-series (fetch)}\\
\cliout{hue 192.168.0.8:docs/tv-series (push)}}
\cmdarg{gitlab} \cliout{https://git.lumc.nl/zorro/tv-series.git (fetch)}\\
\cmdarg{gitlab} \cliout{https://git.lumc.nl/zorro/tv-series.git (push)}\\
\cmdarg{hue} \cliout{192.168.0.8:docs/tv-series (fetch)}\\
\cmdarg{hue} \cliout{192.168.0.8:docs/tv-series (push)}}
\end{framed}
\end{pframe}
\begin{pframe}
\begin{center}
\includegraphics[width=\textwidth]{images/remotes_02.pdf}
\end{center}
\end{pframe}
\section{Transferring commits between repositories}
\subsection{Fetching, merging, and pushing}
\begin{pframe}
......@@ -106,48 +122,68 @@
(There's a shortcut for the first two: \gitcmd\ \cmd{pull})
\end{pframe}
\begin{pframe}
\begin{center}
\includegraphics[width=\textwidth]{images/commit_graph_00.pdf}
\end{center}
\end{pframe}
\subsection{Updating remote commits: \texttt{git fetch}}
\begin{pframe}
\begin{framed}
\prompt\ \gitcmd\ \cmd{fetch} \cmdarg{hue}\\
\small{
\cliout{remote: Counting objects: 5, done.}
\cliout{remote: Compressing objects: 100\% (2/2), done.}\\
\cliout{remote: Total 3 (delta 0), reused 0 (delta 0)}\\
\cliout{Unpacking objects: 100\% (3/3), done.}\\
\cliout{From 192.168.0.8:docs/tv-series}\\
\cliout{ * [new branch] master -> hue/master}\\
\cliout{ * [new branch] master -> hue/master}}
\end{framed}
\pause
\includegraphics[width=10cm]{example-hue}
\vspace{-0.5cm}
\begin{center}
\includegraphics[width=\textwidth]{images/commit_graph_01.pdf}
\end{center}
\end{pframe}
\subsection{Merging remote information: \texttt{git merge}}
\begin{pframe}
We can merge the commits from a remote into our own.
We can \cmd{merge} the commits from a remote into our own \cmdarg{master}.
\vspace{-0.4cm}
\begin{framed}
\prompt\ \gitcmd\ \cmd{merge} \cmdarg{hue/master}\\
\small{
\cliout{Updating c7f3bd9..251a51b}\\
\cliout{Fast-forward}\\
\cliout{testlib.py | 2 +}\\
\cliout{1 file changed, 2 insertions(+)}
\cliout{1 file changed, 2 insertions(+)}}
\end{framed}
\pause
\includegraphics[width=10cm]{example-hue-merged}
\vspace{-0.6cm}
\begin{center}
\includegraphics[width=\textwidth]{images/commit_graph_02.pdf}
\end{center}
\end{pframe}
\subsection{Continue adding commits locally}
\begin{pframe}
If we add some more commits, our local repository gets ahead of the remote
repository.
\vspace{-0.3cm}
\begin{framed}
\prompt\ ... \\
\prompt\ \gitcmd\ \cmd{commit}
\end{framed}
\pause
\includegraphics[width=10cm]{example-hue-ahead}
\vspace{-0.5cm}
\begin{center}
\includegraphics[width=\textwidth]{images/commit_graph_03.pdf}
\end{center}
% \includegraphics[width=10cm]{example-hue-ahead}
\end{pframe}
\subsection{Pushing changes to a remote: \texttt{git push}}
......@@ -155,30 +191,36 @@
\vspace{-0.5cm}
\begin{framed}
\prompt\ \gitcmd\ \cmd{push} \cmdarg{hue} \cmdarg{master}\\
\small{
\cliout{Counting objects: 5, done.}\\
\cliout{Delta compression using up to 4 threads.}\\
\cliout{Compressing objects: 100\% (2/2), done.}\\
\cliout{Writing objects: 100\% (3/3), 303 bytes, done.}\\
\cliout{Total 3 (delta 1), reused 0 (delta 0)}\\
\cliout{To hue.remote:docs/tv-series}\\
\cliout{0535b7e..0676334 simpsons -> simpsons}
\cliout{0535b7e..0676334 simpsons -> simpsons}}
\end{framed}
\pause
\end{pframe}
\includegraphics[width=9cm]{example-hue-pushed}
\begin{pframe}
\vspace{0.8cm}
\begin{center}
\includegraphics[width=\textwidth]{images/commit_graph_04.pdf}
\end{center}
\end{pframe}
\subsection{Cloning an existing repository}
\begin{pframe}
Instead of creating repositories using \gitcmd\ \cmd{init}, you can create a
local {\em clone} of an existing (remote) repository.
local \cmd{clone} of an existing (remote) repository.
\begin{framed}
\prompt\ \gitcmd\ \cmd{clone} \cmdarg{https://git.lumc.nl/zorro/tv-series.git}\\
\small{
\cliout{Cloning into 'tv-series'...}\\
\cliout{remote: Counting objects: 6, done.}\\
\cliout{remote: Compressing objects: 100\% (4/4), done.}\\
\cliout{remote: Total 6 (delta 1), reused 0 (delta 0)}\\
\cliout{Unpacking objects: 100\% (6/6), done.}
\cliout{Unpacking objects: 100\% (6/6), done.}}
\end{framed}
\end{pframe}
......@@ -189,8 +231,8 @@
\prompt\ \cmd{cd} \cmdarg{tv-series/}\\
\prompt\ \gitcmd\ \cmd{remote} \cmdopt{-v}\\
\small{
\cliout{origin https://git.lumc.nl/zorro/tv-series.git (fetch)}\\
\cliout{origin https://git.lumc.nl/zorro/tv-series.git (push)}}
\cmdarg{origin} \cliout{https://git.lumc.nl/zorro/tv-series.git (fetch)}\\
\cmdarg{origin} \cliout{https://git.lumc.nl/zorro/tv-series.git (push)}}
\end{framed}
\end{pframe}
......@@ -205,14 +247,14 @@
\vspace{-0.3cm}
\begin{framed}
\prompt\ \gitcmd\ \cmd{push}\\
--------\\
- instead of -\\
\prompt\ \gitcmd\ \cmd{push} \cmdarg{origin} \cmdarg{master}
\end{framed}
\vspace{-0.6cm}
\begin{framed}
\prompt\ \gitcmd\ \cmd{pull}\\
--------\\
- instead of -\\
\prompt\ \gitcmd\ \cmd{fetch} \cmdarg{origin}\\
\prompt\ \gitcmd\ \cmd{merge} \cmdarg{origin/master}
\end{framed}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment