Commit bdc7d7f0 authored by Mihai's avatar Mihai

Begin remotes refactor

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