Révision partielle de formations EOLE
This commit is contained in:
33
content/outils/scm/git/configuration/alias.tex
Normal file
33
content/outils/scm/git/configuration/alias.tex
Normal file
@ -0,0 +1,33 @@
|
||||
\begin{frame}
|
||||
\frametitle{Ergonomie}
|
||||
\framesubtitle{alias}
|
||||
Les alias sont des raccourcis gérés pas git.
|
||||
|
||||
\commande{git config alias.<nom de l'alias> "<commande>"}
|
||||
|
||||
\begin{exampleblock}{Nature des commandes}
|
||||
Les commandes peuvent aussi bien être des options et sous-commandes de git que des commandes externes accessibles au shell.
|
||||
\end{exampleblock}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}[fragile]
|
||||
\frametitle {Ergonomie}
|
||||
\framesubtitle{Exemples d'alias}
|
||||
\begin{minted}[fontsize=\tiny]{ini}
|
||||
[alias]
|
||||
co = checkout
|
||||
st = status
|
||||
fe = fetch
|
||||
lo = log --oneline
|
||||
re = reset --hard HEAD~1
|
||||
br = branch
|
||||
mnf = merge --no-ff
|
||||
sw = checkout @{-1}
|
||||
lu = log ..@{upstream}
|
||||
luo = log --oneline ..@{upstream}
|
||||
ul=log @{upstream}..HEAD
|
||||
ulo=log --oneline @{upstream}..HEAD
|
||||
cslt = !git describe --long --first-parent | awk -F'/' '{print $NF}' | awk -F'-' '{print $(NF-1)}'
|
||||
clf = !git lo --no-merges $(git lo -1 --pretty=format:"%h" debian/changelog)..
|
||||
\end{minted}
|
||||
\end{frame}
|
10
content/outils/scm/git/configuration/editeur.tex
Normal file
10
content/outils/scm/git/configuration/editeur.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\begin{frame}
|
||||
\frametitle{Ergonomie}
|
||||
\framesubtitle{Interface}
|
||||
\begin{itemize}
|
||||
\item \commande{git config --global core.editor "vim"}
|
||||
\item \commande{git config --global core.pager "less"}
|
||||
\item \commande{git config --global color.ui auto}
|
||||
\end{itemize}
|
||||
% contenu (pas trop long) de la diapositive
|
||||
\end{frame}
|
0
content/outils/scm/git/configuration/gitignore.tex
Normal file
0
content/outils/scm/git/configuration/gitignore.tex
Normal file
47
content/outils/scm/git/configuration/hooks.tex
Normal file
47
content/outils/scm/git/configuration/hooks.tex
Normal file
@ -0,0 +1,47 @@
|
||||
\begin{frame}
|
||||
\frametitle{Ergonomie}
|
||||
\framesubtitle{Hooks}
|
||||
Les hooks sont des actions déclenchées par des évènements concernant le dépôt git.
|
||||
\begin{exampleblock}{}
|
||||
Les hooks sont des scripts exécutables (pas de langage imposé) posés dans le dossier .git/hooks.
|
||||
\end{exampleblock}
|
||||
|
||||
\end{frame}
|
||||
\begin{frame}
|
||||
\frametitle{Ergonomie}
|
||||
\framesubtitle{Hooks pour le client}
|
||||
\begin{columns}
|
||||
\begin{column}{0.5\textwidth}
|
||||
\begin{itemize}
|
||||
\item pre-commit
|
||||
\item prepare-commit-msg
|
||||
\item commit-msg
|
||||
\item post-commit
|
||||
|
||||
\item applypatch-msg
|
||||
\item preapply-patch
|
||||
\item postapply-patch
|
||||
\end{itemize}
|
||||
|
||||
\end{column}
|
||||
\begin{column}{0.5\textwidth}
|
||||
\begin{itemize}
|
||||
\item pre-rebase
|
||||
\item post-rewrite
|
||||
\item post-checkout
|
||||
\item post-merge
|
||||
\item pre-push
|
||||
\end{itemize}
|
||||
\end{column}
|
||||
\end{columns}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Ergonomie}
|
||||
\framesubtitle{Hooks pour le serveur}
|
||||
\begin{itemize}
|
||||
\item pre-receive
|
||||
\item update
|
||||
\item post-receive
|
||||
\end{itemize}
|
||||
\end{frame}
|
8
content/outils/scm/git/configuration/presentation.tex
Normal file
8
content/outils/scm/git/configuration/presentation.tex
Normal file
@ -0,0 +1,8 @@
|
||||
\begin{frame}
|
||||
\frametitle{Configurer git}
|
||||
\framesubtitle{Une configuration souple}
|
||||
\begin{itemize}
|
||||
\item configuration globale
|
||||
\item configuration par dépôt
|
||||
\end{itemize}
|
||||
\end{frame}
|
16
content/outils/scm/git/configuration/shell.tex
Normal file
16
content/outils/scm/git/configuration/shell.tex
Normal file
@ -0,0 +1,16 @@
|
||||
\begin{frame}[fragile]
|
||||
\frametitle{Ergonomie}
|
||||
\framesubtitle{bash}
|
||||
\begin{minted}{bash}
|
||||
source ~/.git-prompt.sh
|
||||
GIT_PS1_SHOWDIRTYSTATE=1
|
||||
GIT_PS1_SHOWSTASHSTATE=1
|
||||
GIT_PS1_SHOWUNTRACKEDFILES=1
|
||||
GIT_PS1_SHOWUPSTREAM="auto"
|
||||
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
|
||||
\end{minted}
|
||||
\begin{exampleblock}{git-prompt}
|
||||
git-prompt.sh est un script définissant la fonction \_\_git\_ps1 permettant d'afficher des informations pertinentes sur l'état du dépôt git dans l'invite de commande.
|
||||
\end{exampleblock}
|
||||
% contenu (pas trop long) de la diapositive
|
||||
\end{frame}
|
9
content/outils/scm/git/configuration/user.tex
Normal file
9
content/outils/scm/git/configuration/user.tex
Normal file
@ -0,0 +1,9 @@
|
||||
\begin{frame}
|
||||
\frametitle{Configurer git}
|
||||
\framesubtitle{Identifier l'utilisateur}
|
||||
git associe à chaque commit des informations sur la personne ayant commité et sur la personne ayant mergé le commit.
|
||||
\begin{itemize}
|
||||
\item \commande{git config --global user.name "<nom d'utilisateur>"}
|
||||
\item \commande{git config --global user.email "<courriel>"}
|
||||
\end{itemize}
|
||||
\end{frame}
|
Reference in New Issue
Block a user