Commit bdc7d7f0 authored by Mihai's avatar Mihai

Begin remotes refactor

parent 1ccf7f59
......@@ -54,43 +54,44 @@
\subsection{Listing remotes}
\begin{pframe}
\begin{lstlisting}
$ git remote
gitlab
\end{lstlisting}
\begin{framed}
\prompt\ \gitcmd\ \cmd{remote} \\
\cliout{gitlab}
\end{framed}
We are on \lstinline{aida} and have one remote, \lstinline{gitlab}, defined.
\pause
\begin{lstlisting}[basicstyle=\ttfamily\footnotesize]
$ git remote -v
gitlab https://git.lumc.nl/zorro/tv-series.git (fetch)
gitlab https://git.lumc.nl/zorro/tv-series.git (push)
\end{lstlisting}
\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)}}
\end{framed}
\lstinline{-v}: Include remote location.
\bigskip
\cmdopt{-v}: Include remote location.
We see that communication with \lstinline{gitlab} is over HTTPS.
\end{pframe}
\subsection{Adding a remote: \texttt{git remote add}}
\begin{pframe}
\begin{lstlisting}
$ git remote add hue 192.168.0.8:docs/tv-series
\end{lstlisting}
\begin{framed}
\prompt\ \gitcmd\ \cmd{remote} \cmd{add} \cmdarg{hue} \cmdarg{192.168.0.8:docs/tv-series}
\end{framed}
This adds a reference to the repository on the remote machine with name
\lstinline{hue}.
\cmdarg{hue}.
\pause
\begin{lstlisting}[basicstyle=\ttfamily\footnotesize]
$ git remote -v
gitlab https://git.lumc.nl/zorro/tv-series.git (fetch)
gitlab https://git.lumc.nl/zorro/tv-series.git (push)
hue 192.168.0.8:docs/tv-series (fetch)
hue 192.168.0.8:docs/tv-series (push)
\end{lstlisting}
\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)}}
\end{framed}
\end{pframe}
\section{Transferring commits between repositories}
......@@ -98,11 +99,11 @@ hue 192.168.0.8:docs/tv-series (push)
\begin{pframe}
There are three main commands to work with a remote:
\begin{itemize}
\item \lstinline{git fetch} to update our knowledge of the remote.
\item \lstinline{git merge} to use the remote commits.
\item \lstinline{git push} to send our local commits to the remote.
\item \gitcmd\ \cmd{fetch} to update our knowledge of the remote.
\item \gitcmd\ \cmd{merge} to use the remote commits.
\item \gitcmd\ \cmd{push} to send our local commits to the remote.
\end{itemize}
(There's a shortcut for the first two: \lstinline{git pull})
(There's a shortcut for the first two: \gitcmd\ \cmd{pull})
\end{pframe}
\subsection{Updating remote commits: \texttt{git fetch}}
......
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