diff --git a/basics/basics_handouts.tex b/basics/basics_handouts.tex new file mode 100644 index 0000000000000000000000000000000000000000..d039cf34df31d1196b8d37184908b9134796bd46 --- /dev/null +++ b/basics/basics_handouts.tex @@ -0,0 +1,73 @@ +\documentclass{article} +\usepackage{fullpage} + +\frenchspacing +\setlength{\parindent}{0pt} +\pagestyle{empty} + +\begin{document} +\begin{center} +{\bf Git Introduction Course} + +Git Basics practical. +\end{center} +\bigskip + +\subsubsection*{Create a repository.} +First, create an empty directory and use ``\texttt{git init}'' to make a new +repository. +\begin{itemize} + \item \emph{Question:} How can you see that you are working in a Git + repository? +\end{itemize} +\bigskip + +Check the status of your files. +\bigskip + +\subsubsection*{Your first commit.} +Create a new file named ``README'' (with an editor, or by using the +``\texttt{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 ``\texttt{git add}''. +\begin{itemize} + \item \emph{Question:} What is the status of this file now? +\end{itemize} +\bigskip + +Commit your changes. +\begin{itemize} + \item \emph{Question:} What happened to the status? +\end{itemize} +\bigskip + +\subsubsection*{Manipulation in the staging area.} +Edit your file and stage it. +\bigskip + +Now remove the file from the staging area. +\bigskip + +\subsubsection*{Working with versions.} +Commit your changed file. +\bigskip + +Now you change your mind, and want to revert this commit. +\begin{itemize} + \item \emph{Hint:} Use ``\texttt{git log}'' to see a list of all your + versions. +\end{itemize} +\bigskip + +Edit your file again and check the differences with your last commit. +\begin{itemize} + \item \emph{Question:} What is the difference with your first commit? +\end{itemize} +\bigskip + +Make a file that you do not want to track. +\end{document}