Skip to content
Snippets Groups Projects
Commit 66d1b67b authored by RIEHM Clement's avatar RIEHM Clement
Browse files

Ajout de la partie Git

parent a84f6b1d
Branches
No related tags found
No related merge requests found
...@@ -109,6 +109,72 @@ Ajouter \verb|$(vagrant_prompt_info)| au PROMPT dans le themes ...@@ -109,6 +109,72 @@ Ajouter \verb|$(vagrant_prompt_info)| au PROMPT dans le themes
\subsection*{\#8} \subsection*{\#8}
\subsection*{\#9} \subsection*{\#9}
\subsection*{\#10} \subsection*{\#10}
\section{Efficacité de l'environnement de travail} \section{Git}
\subsection*{\#1} \subsection*{\#1}
\begin{lstlisting}[language=bash]
~/git/vagrantssh $ git init
git status
vagrant up
vagrant halt
git status
\end{lstlisting}
Un dossier .vagrant est créé. L’ajouter dans le fichier gitignore pour l’ignorer.
\begin{lstlisting}[language=bash]
echo .vagrant/ >> .gitignore
git add README.md Vagrantfile srv/
git commit -m "Ajout initial"
git log
git show cdc5df9f5ec0abe55cc6d825c5c6008560199688
\end{lstlisting}
\subsection*{\#2.1}
\begin{lstlisting}[language=bash]
git checkout -b new-branche-2000
nvim Vagrantfile
git add -p
\end{lstlisting}
Les modification ne sont pas dans le working directory.
\subsection*{\#2.2}
\begin{lstlisting}[language=bash]
git checkout master
git merge new-branche-2000
git log
git show 8fa8008b2c7eeb6e55115f019b6e7ca3e439a4dd
\end{lstlisting}
Spécificité : Le HEAD -> master
\begin{lstlisting}[language=bash]
commit 8fa8008b2c7eeb6e55115f019b6e7ca3e439a4dd (HEAD -> master, new-branche-2000)
\end{lstlisting}
\begin{lstlisting}[language=bash]
git branch
* master
new-branche-2000
\end{lstlisting}
La branche existe toujours. On peut supprimer la branche.
\subsection*{\#3}
\begin{lstlisting}[language=bash]
git checkout master
git merge new-branche-2000
git log
git show 8fa8008b2c7eeb6e55115f019b6e7ca3e439a4dd
\end{lstlisting}
\subsection*{\#4}
\begin{lstlisting}[language=bash]
git checkout -b forward-new-port
\end{lstlisting}
\begin{lstlisting}[language=bash]
nvim Vagrantfile
git add Vagrantfile
git commit -m "Forward port 80"
\end{lstlisting}
\begin{lstlisting}[language=bash]
git checkout master
nvim Vagrantfile
git add Vagrantfile
git commit -m "Forward port 80"
\end{lstlisting}
\begin{lstlisting}[language=bash]
git merge forward-new-port
\end{lstlisting}
Git demande de corriger le conflit.
\end{document} \end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment