Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
git-jso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DOSCH Philippe
git-jso
Commits
77d1d106
Commit
77d1d106
authored
11 years ago
by
Philippe Dosch
Browse files
Options
Downloads
Patches
Plain Diff
Explains branch creation and swapping
parent
b75852b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
git.tex
+86
-0
86 additions, 0 deletions
git.tex
with
86 additions
and
0 deletions
git.tex
+
86
−
0
View file @
77d1d106
...
...
@@ -1503,7 +1503,93 @@
%======================================================================
\frame
{
\frametitle
{
Intérêt de nouvelles branches
}
\begin{itemize}
\item
Il est possible de créer de nouvelles branches pour faire évoluer,
\textit
{
simultanément
}
, le développement dans des directions
différentes
\begin{itemize}
\item
développement collaboratif (= plusieurs développeurs)
\item
correction de bugs
\item
ajout de fonctionnalités
\item
etc.
\end{itemize}
\item
Un moyen simple de savoir sur quelle branche on se trouve
\\
\mygit
{
git branch
}{
gitbranch1.txt
}
\item
Le symbole
\ex
{
*
}
désigne la branche courante (utile lorsque
plusieurs branches existent)
\end{itemize}
}
%======================================================================
\frame
{
\frametitle
{
Création d'une nouvelle branche
}
\begin{itemize}
\item
Pour créer une nouvelle branche, ajouter un nom de branche à la
commande précédente
\\
\mygitplus
{
git branch nouveau
}
\\
\mygit
{
git branch
}{
gitbranch2.txt
}
\item
Cette commande ne fait que créer une nouvelle branche, elle ne
permet pas de basculer vers cette nouvelle branche
\end{itemize}
}
%======================================================================
\frame
{
\frametitle
{
Création d'une nouvelle branche
}
\begin{itemize}
\item
La création d'une nouvelle branche entraîne la création d'une
nouvelle variable représentant cette branche
\end{itemize}
\begin{center}
\includegraphics
[scale=.4]
{
arbremasternouv.eps
}
\end{center}
}
%======================================================================
\frame
{
\frametitle
{
Le pointeur
\ext
{
HEAD
}}
\begin{itemize}
\item
Pour savoir dans quelle branche le dépôt se situe, git utilise un
pointeur spécial appelé
\ex
{
HEAD
}
\item
Cette variable pointe toujours vers la branche active
\end{itemize}
\begin{center}
\includegraphics
[scale=.4]
{
arbrehead.eps
}
\end{center}
}
%======================================================================
\frame
{
\frametitle
{
Passage d'une branche à une autre
}
\begin{itemize}
\item
La commande permettant de changer de branche est
\ex
{
git checkout
\emph
{
branche
}}
, soit dans l'exemple courant
\\
\mygitplus
{
git checkout nouveau
}
\item
Lors du passage d'une branche à une autre, git restaure le
répertoire de travail dans l'état correspondant à la branche
sélectionnée (uniquement pour les fichiers suivis par git)
\end{itemize}
\begin{center}
\includegraphics
[scale=.4]
{
arbrehead2.eps
}
\end{center}
}
\end{itemize}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment