Skip to content
Snippets Groups Projects
Commit ee5645b8 authored by Administrator's avatar Administrator
Browse files

Resolved merge conflict

parents e30beede 82b8fb8e
No related branches found
No related tags found
No related merge requests found
......@@ -409,10 +409,34 @@ the file given as argument.
\subsubsection*{merge}
\label{merge}
\begin{lstlisting}
andersn@stodola: git pull /tmp/git-tutorial
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From /tmp/git-tutorial
* branch HEAD -> FETCH_HEAD
Auto-merging git-tutorial.tex
CONFLICT (content): Merge conflict in git-tutorial.tex
Automatic merge failed; fix conflicts and then commit the result.
\end{lstlisting}
When we open the file containing the conflict we find a section with
conflict markers;\\
\verb|<<<<<<< local version ======= remote version >>>>>>>|
\begin{lstlisting}
<<<<<<< HEAD
Sometimes it happens that merge conflicts are introduced, the most
common occasion is when two users happen to edit the same lines of a
file.
=======
Bla bla bla bla bla bla
>>>>>>> 82b8fb8e2f4985b12dfb9d402be069eeb070db92
\end{lstlisting}
Resolve the conflict by editing the file and choose which version, or
combination of them, that should be kept. In the above case it seems
pretty obvious that the second version is just crap so we remove it as
well as the conflict markers. Then we commit the resolved file.
\section{Further Reading}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment