Commit ef4d7217 authored by Martijn Vermaat's avatar Martijn Vermaat

Merge branch 'updates_bow' into 'master'

Updates bow

Slight delay because yesterday some things took more time than I predicted..

But I think the tips presentation is ready now :). I added the git-prompt.sh file (which comes with a git install) to the repository just to be sure we have a backup in case the file is not available in the laptops.

Other than that, I skipped the autocrlf / safecrlf config since it seems more complicated for first-time git users. Instead, I added some slides about `git add --patch` for selective commits of line changes, which I think is more useful (and easier to grasp).

Anyway, comments are welcomed.
parents d0537ebd c97df55d
......@@ -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}
......@@ -186,6 +187,43 @@
\end{lstlisting}
\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.}
......@@ -193,8 +231,6 @@
\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
......
../presentation/Makefile
\ No newline at end of file
../presentation/beamerthemelumc.sty
\ No newline at end of file
../presentation/gen2phen_logo.eps
\ No newline at end of file
This diff is collapsed.
../presentation/lgtc_logo.eps
\ No newline at end of file
../presentation/lumc_logo.eps
\ No newline at end of file
../presentation/lumc_logo_small.eps
\ No newline at end of file
../presentation/nbic_logo.eps
\ No newline at end of file
../presentation/ngi_logo.eps
\ No newline at end of file
../presentation/nwo_logo_en.eps
\ No newline at end of file
../pics/
\ No newline at end of file
This diff is collapsed.
../presentation/ul_logo.eps
\ No newline at end of file
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