It's interface abstracts away a lot of the work, meaning it's commands can feel like magic. When it works, this is fine but unfortunately when things go wrong, you can be left - like in this comic - with no idea how to proceed.
I think that understanding a bit about how Git works under the hood will help de-mistily it.
Git's data model is actually quite simple. Understanding the basics of this can really help.
\item Keep track of source code (or other folders and files)
\item Facilitate collaboration
\end{itemize}
\note{%
This applies to most (if not all) version control systems.
It's useful even if you're working on things by your self. This presentation is version controlled.
You can use it to find out when something broke. I won't be covering it today but there is a tool called git bisect that can take a unit test (or script) to analyse when something broke using a binary search.
I think, being honest, we have all done this. This sort of works, if you're working on something by yourself. Once you start collaborating on software, you are going to have a bad time.
However, this is a simple approach and not a million miles from what Git does internally.
I want this to be quite interactive so first things first, let's get Git setup.
}
\end{frame}
\begin{frame}[fragile]
\frametitle{Install}
\begin{minted}{bash}
# Ubuntu / Debian / Kali
sudo apt install git
# Centos / Fedora / Red Hat
sudo dnf install git
# Arch / Antergos / Manjaro
sudo pacman -S git
# Mac
brew install git
\end{minted}
\href{https://gitforwindows.org/}{Git for Windows: https://gitforwindows.org/}
\note{%
Git is probably already installed if you are on a Linux system. However, if not, it will definitely be in your standard repositories.
There is a version of Git provided with xcode, but it is old. Most of the stuff we cover today should still work but (for example) some things need to be run from the root directory in old versions of git that don't in newer versions.
If you have the misfortune to be using windows, I've heard good things about Git for Windows but have not used it personally. It includes Bash emulation.
Hopefully you have Git installed. I will be running it on Linux although the commands should all be the same for Windows and Mac.
Note that I am not using my primary email address. The email address you provide here will be available to anyone with access to repositories you work on.
These settings are stored in \mintinline{bash}{~/.gitconfig}.
There are several times that Git will need to open a text editor. By default, it will use \mintinline{bash}{EDITOR}. If neither is set, it will use VI.