Commit 149fb8f2 authored by bow's avatar bow

Update tips and tricks slide up to gitignore_global

parent 33e9cd8f
......@@ -34,14 +34,98 @@
\begin{frame}[fragile]
\frametitle{}
%
We have only been playing with some of what git offers. In reality,
you can do much more with it. It also allows for a wide array of
customizations.
\bigskip
\begin{lstlisting}[language=none, caption=]
$
We will look into some of these customizations now.
\end{frame}
\section{Main Configuration File}
\begin{frame}[fragile]
\frametitle{Viewing}
In Linux, git uses the ``\bt{~/.gitconfig}'' file as its main
configuration file.
\bigskip
\pause
To see the current configuration values, use ``\bt{git config --list}''.
\begin{lstlisting}[language=none, caption=Git config values]
$ git config --list
user.name=bow
user.email=bow@bow.web.id
color.ui=auto
\end{lstlisting}
\bigskip
\end{frame}
\section{Main Configuration File}
\begin{frame}[fragile]
\frametitle{Modifying}
To edit the file directly, open ``\bt{~/.gitconfig}'' in a text editor
and save your changes.
\begin{lstlisting}[language=none, caption=Modifying the config file]
$ vim ~/.gitconfig
\end{lstlisting}
\bigskip
\pause
You can also use the ``\bt{git config}'' to set the values via the shell.
\begin{lstlisting}[language=none, caption=Modifying via the shell]
$ git config user.name "Linus Torvalds"
\end{lstlisting}
\bigskip
\end{frame}
\section{Main Configuration File}
\begin{frame}[fragile]
\frametitle{Modifying: global ignore}
We will look at two examples now: setting a global ignore file and
setting aliases.
\bigskip
\pause
In addition to setting a directory-specific ``\bt{.gitignore}'' file,
you can also set a global ignore file.
\bigskip
\pause
You can name this file anything. The convention is to use
``\bt{.gitignore\_global}'' and place the file in your home directory.
\bigskip
\end{frame}
\section{Main Configuration File}
\begin{frame}[fragile]
\frametitle{}
The global ignore file has the same format as the per-directory
``\bt{.gitignore}'' file, only visible to all git repositories.
\bigskip
\pause
\begin{lstlisting}[language=none, caption=Setting the global ignore file]
$ echo "*.out" > ~/.gitignore_global
$ echo "testing.txt" > ~/.gitignore_global
$ git config core.excludesfile "~/.gitignore_global"
\end{lstlisting}
\bigskip
\pause
\begin{lstlisting}[language=none, caption=Ignoring via the global file]
$ echo "Is this the real life?" > this.out
$ touch testing.txt
$ git status
nothing to commit, working directory clean
\end{lstlisting}
\bigskip
\end{frame}
......
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