Skip to content
Snippets Groups Projects

Updates bow

Merged bow requested to merge updates_bow into master
+ 1023
4
Compare changes
  • Side-by-side
  • Inline
Files
+ 42
4
@@ -2,7 +2,7 @@
\title{Git Basics}
\providecommand{\myConference}{Git course}
\providecommand{\myDate}{Monday, October 14, 2013}
\providecommand{\myDate}{Monday, June 23, 2014}
\author{Jeroen F. J. Laros}
\providecommand{\myGroup}{Leiden Genome Technology Center}
\providecommand{\myDepartment}{Department of Human Genetics}
@@ -39,6 +39,7 @@
\bigskip
\begin{lstlisting}[language=none, caption=Make a new repository.]
$ cd ~/projects
$ git init
Initialized empty Git repository in <path>/.git/
\end{lstlisting}
@@ -187,14 +188,49 @@
\end{frame}
\begin{frame}[fragile]
\frametitle{Undoing changes.}
Keep in mind that ``\bt{git reset}'' by default sets a staged file back to unstaged.
\begin{lstlisting}[language=none, caption=Unstage a file.]
$ git reset README
$ git status
# Changes not staged for commit:
# modified: README
\end{lstlisting}
\bigskip
\pause
To discard all changes in an unstaged file, you can use ``\bt{git checkout}''
\begin{lstlisting}[language=none, caption=Discarding changes.]
$ git checkout -- .
$ git status
nothing to commit, working directory clean
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Undoing changes.}
For now, let's commit our change and move on.
\bigskip
\begin{lstlisting}[language=none, caption=Adding a new version of a file.]
$ echo Second version. > README
$ git commit
$ git status
nothing to commit, working directory clean
\end{lstlisting}
\bigskip
\end{frame}
\begin{frame}[fragile]
\frametitle{Viewing the history.}
To see the history of your project, use ``\bt{git log}''.
\bigskip
\begin{lstlisting}[language=none, caption=The log of our project.]
$ git add README
$ git commit
$ git log
commit cc61ee7cd72590f3bebcc9e1ff3e9435c7f7dd28
Author: J.F.J. Laros <j.f.j.laros@lumc.nl>
@@ -228,7 +264,7 @@
\bigskip
\pause
You can also use an unique prefix of this hash, usually six characters is
You can also use a unique prefix of this hash, usually six characters is
enough.
\end{frame}
@@ -341,6 +377,8 @@
Zuotian Tatum
Wibowo Arindrarto
\end{center}
\vfill
Loading