Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
git-tutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Nilsson
git-tutorial
Commits
ee5645b8
Commit
ee5645b8
authored
12 years ago
by
Administrator
Browse files
Options
Downloads
Plain Diff
Resolved merge conflict
parents
e30beede
82b8fb8e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
git-tutorial.tex
+25
-1
25 additions, 1 deletion
git-tutorial.tex
with
25 additions
and
1 deletion
git-tutorial.tex
+
25
−
1
View file @
ee5645b8
...
...
@@ -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
}
...
...
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