Commit 91b2d4b5 authored by Mihai's avatar Mihai

Add colors in basics handouts

parent 26f27f6c
......@@ -19,16 +19,20 @@
\subsubsection*{Connect to the education server}
Open \url{http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html} in your browser.
Open \url{http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html} in
your browser. It may be faster to google for putty.
\medskip
Download and run \href{https://the.earth.li/~sgtatham/putty/latest/w32/putty.exe}{\textbf{putty.exe}. (Alternative binary files, the SSH and Telnet client itself)}.
Download and run \href{https://the.earth.li/~sgtatham/putty/latest/w32/putty.exe}{\textbf{putty.exe}.
(Alternative binary files, the SSH and Telnet client itself)}.
\medskip
Introduce the education server IP address \textbf{145.88.35.11} as destination.
\medskip
Make sure that the \textbf{port number} is set to \textbf{22} and that \textbf{SSH} is selected as \textbf{connection type} and press ``\textbf{Open}'' to start the connection.
Make sure that the \textbf{port number} is set to \textbf{22} and that
\textbf{SSH} is selected as \textbf{connection type} and press
``\textbf{Open}'' to start the connection.
\medskip
Press ``Yes'' if the security alert pops up.
......@@ -112,15 +116,16 @@ Introduce your provided \textbf{password} and press enter.
\section{Practical exercises}
\subsubsection*{Local configuration}
First, let Git know what your name and e-mail address is:
\begin{lstlisting}
$ git config --global user.name "Your Name"
$ git config --global user.email "your@email.address"
$ cat ~/.gitconfig
\end{lstlisting}
\medskip
\prompt\ \gitcmd\ \cmd{config} \cmdopt{--global user.name "Your Name"}\\
\prompt\ \gitcmd\ \cmd{config} \cmdopt{--global user.email "your@email.address"}\\
\prompt\ \cmd{cat} $\sim$\cmdopt{/.gitconfig}
\bigskip
\subsubsection*{Create a repository}
First, create an empty directory inside your home directory and use ``\lstinline{git init}'' in that
First, create an empty directory inside your home directory and use
``\gitcmd\ \cmd{init}'' in that
newly-created directory to make a new repository.
\begin{itemize}
\item \emph{Hint:} Use a short and descriptive name for the directory.
......@@ -134,13 +139,13 @@ Check the status of your repository.
\subsubsection*{Your first commit}
Create a new file named ``README'' (with an editor, or by using the
``\lstinline{touch}'' command).
``\cmd{touch}'' command).
\begin{itemize}
\item \emph{Question:} What is the status of this new file?
\end{itemize}
\bigskip
Stage this file for the next commit using ``\lstinline{git add}''.
Stage this file for the next commit using ``\gitcmd\ \cmd{add}''.
\begin{itemize}
\item \emph{Question:} What is the status of this file now?
\end{itemize}
......@@ -159,13 +164,17 @@ Edit your file and stage it.
Now remove the file from the staging area.
\bigskip
Stage the file and commit.
\bigskip
\subsubsection*{Working with versions}
Commit your changed file.
Edit your file again and commit it one more time.
\bigskip
Now you change your mind, and want to revert this commit.
Now you change your mind and you want to restore the version stored in the
previous commit.
\begin{itemize}
\item \emph{Hint:} Use ``\lstinline{git log}'' to see a list of all your
\item \emph{Hint:} Use ``\gitcmd\ \cmd{log}'' to see a list of all your
versions.
\end{itemize}
\bigskip
......
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