Questions tagged [git-merge-conflict]

Questions about resolving merge conflicts in Git.

See also

518 questions
10
votes
2 answers

Git: Confusion about merge algorithm, conflict format, and interplay with mergetools

I don't know the details, but as far as I understand the process of merging and conflict resolution, it goes as follows (assume there is only one file in the repository, modified in two branches): The user issues a git merge command. Git applies…
domin
  • 1,192
  • 1
  • 7
  • 28
10
votes
1 answer

Redo bad git conflict resolution after push

I want to re-create a merge conflict so I can resolve it correctly the second time round. Example: Branch 'A' checked out. Branch 'B' is merged In. Conflicts resolved from merge (creates merge commit). Push to remote. Other people merge into…
Arthurion
  • 751
  • 6
  • 8
10
votes
1 answer

Git Rebase repeats conflicts from last Rebase

Are there any common git usage mistakes or in general any reasons at all why a rebase would repeat the conflicts from the previous rebase if those conflicts had all been resolved in the previous rebase? Furthermore, does rebase have a preference…
John Cast
  • 1,771
  • 3
  • 18
  • 40
10
votes
2 answers

How to setup the git mergetool with the --dir-diff option?

difftool has a great user friendly option for viewing diffs. It is the --dir-diff option - allowing you to arbitrarily browse through two directories. The git mergetool has a very clumsy and unfriendly user interface. Solving merge conflicts has to…
Jurg Zbinden
  • 101
  • 3
10
votes
2 answers

Merging git notes when there are merge conflicts in them

I followed these instructions in order to merge Git notes. I cloned a repo, added notes reference to the commit (refs/notes/commits). When i push it, central repo rejects it as it was non-fast forward—because there was already a refs/notes/commits…
maxmelbin
  • 2,045
  • 3
  • 21
  • 29
9
votes
2 answers

Git merge conflicts resolved and there are no changes to commit

I have a 'featurex' branch extends from develop. When I make a pull request to develop I have conflicts. I'm trying to fix it on this lines: git checkout featurex git merge develop (and I have conflicts) I fixed the conflicts (preserving my branch…
Daniel Delgado
  • 4,813
  • 5
  • 40
  • 48
9
votes
1 answer

Git pull overwrites and does not merge or acknowledge conflict on same branch (master)

Background: I've got what I perceive to be a simple scenario. I've committed changes locally and now I want to merge what's on the remote, in the same branch (ahead of me) into the local, working directory. git branch -vv --list --all gives the…
chb
  • 1,727
  • 7
  • 25
  • 47
9
votes
2 answers

Xcode 9.3 Git merge Issue after solving conflict

I'm Pulling some code from a master branch but it contains conflict with my code. There is only 1 file is in change and only 1 change in it and that contains conflict. I solve it by selecting "Choose right then left" but "Pull" button is not…
Mrugesh Tank
  • 3,495
  • 2
  • 29
  • 59
9
votes
2 answers

Git + Windows + Visual Studio Merge Conflicts Caused by Line Ending Issues between branches

I'm having a difficult time trying to properly merge to branches. The branches seem to have line ending issues because when I open up the conflict window in Visual Studio its showing 0 conflicts and 0 differences between numerous files. I've added a…
99823
  • 2,407
  • 7
  • 38
  • 60
8
votes
1 answer

How to fix conflicts in git?

When I try to pull I have the following message: Automatic merge failed; fix conflicts and then commit the result. So, I try to fix conflict (as git suggest) for that I follow these instructions. Among the first things that I need to do is to open…
Roman
  • 124,451
  • 167
  • 349
  • 456
7
votes
5 answers

Why doesn't git give me any conflicts?

I found a strange problem. I was testing a git repo and found in this situation. I created a simple git repo and add a text file with the following content. Hello Git..! First Line Committed as the initial commit. Then I created a branch called…
Ranjith Suranga
  • 316
  • 1
  • 10
7
votes
1 answer

How do I get KDiff3 to auto merge with no UI?

How do I get KDiff3 to automatically do a 3-way merge such that it shows no UI? Ideally, if it succeeds, it returns success, and if it can't (it needs manual merging), it returns an error code. Everything I've read seems to imply that the following…
7
votes
1 answer

Automatic merging in git without conflicts (using word-by-word diff instead of line-by-line)

I’d like to automatically merge commits where each commit changes a different word on the same line. The goal is to use git as a document storage and access it programmatically (thus, ideally without having to resolve conflicts). In my use case, I…
Adam Libuša
  • 685
  • 7
  • 24
7
votes
1 answer

Visual Studio Code doesn't stage Git merge changes

Using Git as a source control provider in Visual Studio Code I have an issue whenever I try to merge a conflict file with remote repository keeping my current version. The steps are the following: A file has been modified on remote repository and I…
7
votes
2 answers

Resolve conflicts from am session

I wanted to cherry pick multiple commits from one repository to another. I followed the instructions provided from this Stack Overflow post: /path/to/2 $ git --git-dir=/path/to/1/.git format-patch --stdout sha1^..sha1 | git am -3 And a conflict…
MHogge
  • 5,408
  • 15
  • 61
  • 104
1 2
3
34 35