Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Picasoft
APIs
Init
Git
Commits
2bfa3729
Verified
Commit
2bfa3729
authored
Jan 03, 2019
by
Thibaud Duhautbout
Browse files
Gestion non linéaire - commandes git
parent
eab2e20a
Pipeline
#32856
passed with stage
in 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
imgs/graph_gitlab.png
0 → 100644
View file @
2bfa3729
165 KB
src/tex/gestion_non_lineaire/application_git.tex
View file @
2bfa3729
\begin{frame}
\frametitle
{
Gestion des branches
}
\begin{frame}
[fragile]
\frametitle
{
Gestion pratique des branches
}
\begin{block}
{
Création d'une branche
}
\begin{itemize}
\item
\verb
+
git branch <nom>
+
pour créer une branche ;
\item
\verb
+
git checkout -b <nom>
+
pour créer une branche et changer la branche courante pour celle-ci.
\end{itemize}
\end{block}
\Pause
\begin{block}
{
Statut des branches
}
\begin{itemize}
\item
La commande
\verb
+
git status
+
indique la branche courante;
\item
La commande
\verb
+
git branch
+
montre la liste des branches et la branche courante.
\end{itemize}
\end{block}
\Pause
\begin{block}
{
Suppression d'une branche
}
\begin{itemize}
\item
\verb
+
git branch -d <nom>
+
pour supprimer une branche;
\item
Si la branche n'a pas été fusionnée,
\verb
+
git branch -D <nom>
+
.
\end{itemize}
\end{block}
\end{frame}
\begin{frame}
\begin{frame}
[fragile]
\frametitle
{
Changer de branche
}
\framesubtitle
{
Plus facile qu'à l'UTC !
}
\begin{block}
{
Comment faire ?
}
\begin{itemize}
\item
Une commande simple :
\verb
+
git checkout <nom_de_la_branche>
+
;
\item
{
\bf
Attention :
}
ne pas avoir de changements non validés ! (ou passer par un
\verb
+
git stash
+
)
\end{itemize}
\end{block}
\Pause
\begin{block}
{
Rappel
}
\verb
+
git checkout
+
sert aussi à se déplacer sur un commit précis.
\\
En fait, cette commande sert à déplacer le
\verb
+
HEAD
+
. On peut assimiler un
\verb
+
checkout
+
sur une branche à un
\verb
+
checkout
+
sur un commit.
\\
En fait, le nom de le branche n'est
{
\bf
qu'une étiquette
}
sur le dernier commit de celle-ci.
\end{block}
\end{frame}
\begin{frame}
\begin{frame}
[fragile]
\frametitle
{
Visualisation
}
\framesubtitle
{
Un joli graphe !
}
\begin{itemize}
\item
En console :
\verb
+
git log --graph --decorate --all
+
\item
Depuis GitLab :
\end{itemize}
\begin{center}
\includegraphics
[height=.5\paperheight]
{
imgs/graph
_
gitlab.png
}
\end{center}
\end{frame}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment