diff --git a/gitrefcard.tex b/gitrefcard.tex
index cbbdaf60631748027b7c86ecfc2bc1c338f45804..064fab77518e461bd1bf2602d39c84a0bd8db377 100644
--- a/gitrefcard.tex
+++ b/gitrefcard.tex
@@ -5,10 +5,21 @@
 
 %\usepackage{gitcommon}
 
+\usepackage{makeidx}
+% Hack, built from both tocbibbind and scrreprt, in order to
+% have an index entry in the TOC referencing the good page
+% (a basic \addcontentsline before \printindex is not efficient enough)
+\usepackage{tocbibindphil}
+
+\newcommand{\exindex}[1]{\index{#1@\texttt{#1}}}
+\newcommand{\inex}[1]{\input{exos/ex#1}}
+
+\makeindex
+
 \begin{document}
 
 \begin{center}
-  \textbf{\Huge Aide mémoire Git}
+  \frame{\textbf{\Huge Aide mémoire Git}}
 \end{center}
 
 %======================================================================
diff --git a/tocbibindphil.sty b/tocbibindphil.sty
new file mode 100644
index 0000000000000000000000000000000000000000..b9ab5e7041a0f1e8979dbf6b2d159e038ee10114
--- /dev/null
+++ b/tocbibindphil.sty
@@ -0,0 +1,27 @@
+%%
+%% This is file `tocbibindphil.sty', based on `tocbibind.sty'
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{tocbibindphil}[2010/08/26 v1.5i extra ToC listings]
+
+\renewenvironment{theindex}%
+{\if@twocolumn
+  \@restonecolfalse
+  \else
+  \@restonecoltrue
+  \fi
+  \columnseprule \z@
+  \columnsep 35\p@
+  \setchapterpreamble{\index@preamble}%
+  \idx@heading%
+  \addcontentsline{toc}{chapter}{Index}
+  \thispagestyle{\indexpagestyle}\parindent\z@
+  \setlength{\parskip}{\z@ \@plus .3\p@}%
+  \setlength{\parfillskip}{\z@ \@plus 1fil}%
+  \let\item\@idxitem}
+{\if@restonecol\onecolumn\else\clearpage\fi}
+
+
+\endinput
+%%
+%% End of file `tocbibindphil.sty'.