Questions tagged [merge-conflict-resolution]

When merging branches in a version control system, a merge conflict might arise. This tag is for questions about how such conflicts can be resolved.

See also

755 questions
0
votes
2 answers

Show all current conflicts using tool

I am sometimes having conflicts when merging two branches using subversion. This is not a real problem, as I just have to look at the actual code and solve them one after the other. But I usually don't want to solve them during the merge process,…
jlengrand
  • 12,152
  • 14
  • 57
  • 87
0
votes
1 answer

Does git checkout --ours affect files that are not in conflict?

I am rebasing a lot of commits right now, and previously one caused a conflict in two files. I examined those and decide that I can safely use "ours (master)". So I ran the git checkout --ours ., and the conflict files successfully used the master…
lulalala
  • 17,572
  • 15
  • 110
  • 169
0
votes
1 answer

How to avoid Git merge conflict after several relocations of a file?

When I'm trying to merge Git says: foo.txt deleted in HEAD and modified in release Actually, I didn't delete foo.txt in my branch, but moved it to a new place, a few times. I suspect that Git lost this multiple movement information and now thinks…
yegor256
  • 102,010
  • 123
  • 446
  • 597
0
votes
2 answers

Merge two modified versions of an original string

This is related to version control, in a parallel modification situation where we do not know the exact timing of changes, so we assume that we receive two modified versions of a file at the same time. I simplify the problem: I have a string S, with…
nvd_ai
  • 1,060
  • 11
  • 20
0
votes
1 answer

Local-only text segment is displayed outside markers in conflict file

In a conflict resolution file generated by git, only common code should be displayed outside the markers ('<<<<<<< ours' - '>>>>>>> theirs') - correct?! I have a CSS file with comments that I have inserted in the local version and a conflict…
Basel Shishani
  • 7,735
  • 6
  • 50
  • 67
0
votes
1 answer

How do I reintegrate a feature branch with broken merge history in SVN?

I have a long-lived feature development branch, let's call it dev-foo. The problem is that when I try to merge it into release-1, I get all kinds of horrible tree-conflicts and source conflicts that don't make any sense. I've re-integrated them into…
-1
votes
1 answer

squashed prs are causing major conflicts in my stacked branches

as I work I create a branch (branch1) then I create a pr (pr1), then I keep working on the feature which is based on the code in that branch1. I create a branch (branch2) off of my branch (branch1). Then I create a pr(pr2) based on pr1. Maybe…
Raif
  • 8,641
  • 13
  • 45
  • 56
-1
votes
2 answers

How to deal with working on same git files?

My colleague worked on same files as me, even though he knew I was also working on that files, and he pushed changes. Can I pull his changes to my local branch without losing my changes? Is there any way of dealing with this mess? Also, I refactored…
newhere
  • 39
  • 1
  • 8
-1
votes
1 answer

Git merge conflicts where HEAD + commit are identical

I just ran a git pull origin master and many of the merge conflicts are identical in HEAD and the upstream commit: <<<<<<< HEAD gem 'fuzzy-string-match' ======= gem 'fuzzy-string-match' >>>>>>> 50147a3519be5bc883dabce86525ee4f36640b22 There are…
duhaime
  • 25,611
  • 17
  • 169
  • 224
-1
votes
2 answers

Master polluted, make master clean as well clean branch which are in sync with polluted master

Problem Statement: I have 2 main branches: master(PROD) & dev(UAT). Whenever my team receives a change request on the application, we create a branch from master do our changes, and before merging the branch into master, we do "git pull origin…
Anand Vardhan
  • 37
  • 1
  • 11
-1
votes
1 answer

Merge conflict in Git. Need local env prior to Git Stash + Pull

I used the following git commands: git stash git pull After pull, the command line displayed: Auto-merging ...path/ConflictFile.xxx CONFLICT (content): Merge conflict in ...path/ConflictFile.xxx Automatic merge failed; fix conflicts and then commit…
-1
votes
1 answer

Git does not raise merge conflict when a branch with a changed file is merged in the master branch

I was expecting a merge conflict when I tried to merge a branch into master. Both of these branches have a text file with different text in them. # make project directory mkdir projA cd projA # initialize git repo git init # make commit in master…
n0obcoder
  • 649
  • 8
  • 24
-1
votes
2 answers

Merge Conflict in .eslintcache file

Screenshot from Github repository While merging two branches there is a merge conflict arising in .eslintcache file. I am not understanding how to solve this merge conflict. Tried resolving it on the editor as well but still no use.
-1
votes
1 answer

The most painless way of resolving conflicts when merging feature branches

I created 2 branches from master at about the same time to work on 2 different features. But in the process of working on them, I will have to make different changes to the same class A in both of these 2 branches. Moreover, the same class A has…
-1
votes
1 answer

How to do git copy merge from one branch to other

How do I copy merge from branch to other. Let's say I have a branch A and B. I want to do copy merge from B to A. I.e. Ignore all changes done on branch A and simply copy all change from B to A. Copy merge should delete new files folders on branch A…