diff --git a/rendu.tex b/rendu.tex index 220eeee4492103b0d351346cfc46c2866035adfe..d96299329cf6808211b99ef289ece8dc03ef0fd9 100644 --- a/rendu.tex +++ b/rendu.tex @@ -109,6 +109,72 @@ Ajouter \verb|$(vagrant_prompt_info)| au PROMPT dans le themes \subsection*{\#8} \subsection*{\#9} \subsection*{\#10} -\section{Efficacité de l'environnement de travail} +\section{Git} \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}