Compare commits
5 commits
Author | SHA1 | Date | |
---|---|---|---|
|
bc88d8ba59 | ||
|
2be367ed02 | ||
|
4456e16333 | ||
|
534671c188 | ||
|
703737785a |
5 changed files with 85 additions and 26 deletions
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
This is a presentation about Git.
|
This is a presentation about Git.
|
||||||
|
|
||||||
|
## Download
|
||||||
|
|
||||||
|
If you just want to download a copy of the presentation, you can do so [here](https://git.jonathanh.co.uk/attachments/b2f284a7-d9fe-4dda-b8e4-485d79cdfa6e).
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
To build it, you will need make, pdflatex and ansi-to-svg and inkscape.
|
To build it, you will need make, pdflatex and ansi-to-svg and inkscape.
|
||||||
|
|
25
greeting.py
Normal file
25
greeting.py
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def cat():
|
||||||
|
print("Meow")
|
||||||
|
|
||||||
|
def dog():
|
||||||
|
print("Woof")
|
||||||
|
|
||||||
|
def cow():
|
||||||
|
print("Moo")
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if len(sys.argv) > 1 and sys.argv[1] == "cat":
|
||||||
|
cat()
|
||||||
|
elif len(sys.argv) > 1 and sys.argv[1] == "dog":
|
||||||
|
dog()
|
||||||
|
elif len(sys.argv) > 1 and sys.argv[1] == "cow":
|
||||||
|
cow()
|
||||||
|
else:
|
||||||
|
print("HELLO WORLD")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
76
main.latex
76
main.latex
|
@ -15,6 +15,7 @@
|
||||||
\usepackage{amsmath}
|
\usepackage{amsmath}
|
||||||
\usepackage{pdfpages}
|
\usepackage{pdfpages}
|
||||||
\usepackage{tikz}
|
\usepackage{tikz}
|
||||||
|
\usepackage[UKenglish]{babel}%
|
||||||
\usetikzlibrary{shapes.geometric, arrows}
|
\usetikzlibrary{shapes.geometric, arrows}
|
||||||
\tikzstyle{commit} = [circle, text centered, line width=2,
|
\tikzstyle{commit} = [circle, text centered, line width=2,
|
||||||
minimum size=1.5cm, draw=blue, fill=blue!80, text=white]
|
minimum size=1.5cm, draw=blue, fill=blue!80, text=white]
|
||||||
|
@ -251,31 +252,6 @@
|
||||||
}
|
}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{Staging Area}
|
|
||||||
\begin{itemize}
|
|
||||||
\item Sometimes called the git index
|
|
||||||
\item An intermediate area in which you can pick files to be included in the next commit.
|
|
||||||
\item Also allows you to exclude some files from your version history.
|
|
||||||
\begin{itemize}
|
|
||||||
\item Log files
|
|
||||||
\item Binary files
|
|
||||||
\item Minified files
|
|
||||||
\end{itemize}
|
|
||||||
\end{itemize}
|
|
||||||
\note{%
|
|
||||||
This is the last thing before we start actually doing stuff (promise).
|
|
||||||
|
|
||||||
This is particularly useful if you have multiple logically unrelated changes and want to
|
|
||||||
make separate snapshots for each.
|
|
||||||
|
|
||||||
Also useful if when programming you write your tests along side your code, you would
|
|
||||||
normally want those to be separate snapshots.
|
|
||||||
|
|
||||||
We will talk about .gitignore later which is another way of ignoring files
|
|
||||||
}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}[fragile]
|
\begin{frame}[fragile]
|
||||||
\frametitle{Install}
|
\frametitle{Install}
|
||||||
|
|
||||||
|
@ -374,6 +350,19 @@
|
||||||
}
|
}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Create a repository}
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{auto-shell-tree-empty-git.pdf}
|
||||||
|
\end{center}
|
||||||
|
\note{%
|
||||||
|
Do this in a live terminal. MAKE SURE YOU MAKE YOUR FONT BIGGER
|
||||||
|
|
||||||
|
Show that the \mintinline{bash}{.git} folder has been created and do a tree to show what is
|
||||||
|
in it.
|
||||||
|
}
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
\begin{frame}[fragile]
|
\begin{frame}[fragile]
|
||||||
\frametitle{Git status}
|
\frametitle{Git status}
|
||||||
|
|
||||||
|
@ -388,6 +377,31 @@
|
||||||
}
|
}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Staging Area}
|
||||||
|
\begin{itemize}
|
||||||
|
\item Sometimes called the git index
|
||||||
|
\item An intermediate area in which you can pick files to be included in the next commit.
|
||||||
|
\item Also allows you to exclude some files from your version history.
|
||||||
|
\begin{itemize}
|
||||||
|
\item Log files
|
||||||
|
\item Binary files
|
||||||
|
\item Minified files
|
||||||
|
\end{itemize}
|
||||||
|
\end{itemize}
|
||||||
|
\note{%
|
||||||
|
This is the last thing before we start actually doing stuff (promise).
|
||||||
|
|
||||||
|
This is particularly useful if you have multiple logically unrelated changes and want to
|
||||||
|
make separate snapshots for each.
|
||||||
|
|
||||||
|
Also useful if when programming you write your tests along side your code, you would
|
||||||
|
normally want those to be separate snapshots.
|
||||||
|
|
||||||
|
We will talk about .gitignore later which is another way of ignoring files
|
||||||
|
}
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
|
||||||
\begin{frame}[fragile]
|
\begin{frame}[fragile]
|
||||||
\frametitle{Staging Area}
|
\frametitle{Staging Area}
|
||||||
|
@ -1221,4 +1235,16 @@
|
||||||
}
|
}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Questions}
|
||||||
|
|
||||||
|
You can find this presentation here:
|
||||||
|
|
||||||
|
\href{https://git.jonathanh.co.uk/jab2870/Git-Presentation}{https://git.jonathanh.co.uk/jab2870/Git-Presentation}
|
||||||
|
|
||||||
|
\note{%
|
||||||
|
Yes, this presentation uses git for version control
|
||||||
|
}
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
|
@ -22,5 +22,5 @@ git -c color.ui=always status
|
||||||
echo '$ git log --oneline --all --graph'
|
echo '$ git log --oneline --all --graph'
|
||||||
git -c color.ui=always log --oneline --all --graph --decorate=short
|
git -c color.ui=always log --oneline --all --graph --decorate=short
|
||||||
|
|
||||||
echo '$ git merge'
|
echo '$ git merge origin/master'
|
||||||
git -c color.ui=always merge origin/master
|
git -c color.ui=always merge origin/master
|
||||||
|
|
4
shell/tree-empty-git
Executable file
4
shell/tree-empty-git
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
echo '$ tree .git'
|
||||||
|
cd /tmp/demo
|
||||||
|
tree .git
|
Loading…
Add table
Add a link
Reference in a new issue