Questions about resolving merge conflicts in Git.
Questions tagged [git-merge-conflict]
518 questions
0
votes
0 answers
What are these lines when you merge git?
I am new to merging git
<<<<<<< HEAD
import React, { PureComponent } from 'react';
import '../styles/components/Outline.scss';
=======
import React, { useEffect, useRef } from 'react';
>>>>>>> master
import Button from…

Khant
- 958
- 5
- 20
0
votes
1 answer
Merge conflict on unchanged files when working on the same branch
Two people, A and B, are working on the same branch.
Person A pushes changes on file X to the branch. Person B has not touched file X and does git pull.
This resulted in a merge conflict on file X.
Why does this happen, and how does person B avoid,…

Kake
- 62
- 5
0
votes
1 answer
Why does "git stash push" cause "Unmerged paths: ... both modified: ..."?
Q1: How can I reproduce this scenario? (I unsuccessfully tried to reproduce it)
Q2: What does this Unmerged paths:... both modified:... state mean?
I did a git stash (push) and got into an Unmerged paths: ... both modified: ... state, and I don't…

Rob Bednark
- 25,981
- 23
- 80
- 125
0
votes
1 answer
Git rebase is not working by conflicting in current branch
I am trying to run git rebase -i but git rebase is failed to work on my console. Here I am giving the reason and talking about my errors?
fatal: It seems that there is already a rebase-merge directory, and
I wonder if you are in the middle of…

bombom
- 107
- 2
- 12
0
votes
0 answers
github revert commit seems to have destroyed my project
I'm new to React. Basically I created a bug I couldn't resolve, so I reverted to an old commit. Now, instead of reverting like normal, its changed my entire app. for example, one of the components now looks like this with <<<<<<<<<

Matt Fuller
- 125
- 11
0
votes
0 answers
git merge auto resolving instead of showing merge conflict
I've two branches feature and development and for the sake of simplicity, assuming that both the branches have only one file, say test.py
In feature branch,test.py is as follows
--few lines ---
renewal_id = models.IntegerField(null =…

Irfan Harun
- 979
- 2
- 16
- 37
0
votes
0 answers
Why editing two different lines result in merge conflict in git?
I have a single text file, in initial commit
Line1
Line2
I created branch from master, and committed this changes
Line1-b1
Line2
Finally I checkout to master and created this commit,
Line1
Line2-b2
When I try to merge to master , I got the…

The Scientific Method
- 2,374
- 2
- 14
- 25
0
votes
0 answers
Eclipse - Merge tool override previous commits
I'm using Eclipse 2019-12 working with Git using Eclipse UI only
If I commit to master before pull previous commits I can't push my commit to server
I used Team -> Merge Tool (Merge option was disabled)
I merge the changes (shows some files) and…

Ori Marko
- 56,308
- 23
- 131
- 233
0
votes
1 answer
How to force merge to succeed when there are conflicts
We are following template branch approach wherein the new feature branch is created from an empty (folder only) template branch (used for information code as we don't want the entire code base to be deployed).
The problem is that when we try to…

Rahul Raj
- 71
- 6
0
votes
0 answers
Git issues with visual studio project
I am developing my project with git.
I use git extension for visual studio.
I have discovered that some of my code has not been applied correctly after pushes.
I only have a master branch, no other branches.
Every changes from the merge has not…

dalton5
- 915
- 2
- 14
- 28
0
votes
1 answer
3-way git merge and manually picking each difference
Regarding git: I have two branches b1 and b2 with a common ancestor a. Is it possible to merge b1 and b2 in such a way that i see all the diffs of b1 and b2 up until a, indicated with <<< and >>> inside the code so that I can choose for each diff…

Marlo
- 207
- 1
- 4
- 12
0
votes
1 answer
How to fix history in a branch that was rebased, force-push'd, and was merged into someone else's local? Twice?
In our organization we git rebase our branches. We rebase onto master periodically to keep things up-to-date, and git push --force-with-lease, then let any other devs know.
Developer A was working with Developer B on a branch. Developer B rebased…

Offlein
- 665
- 6
- 22
0
votes
1 answer
Git merge revert file to conflict mode
I run git merge
the Auto merge fails and I get conflict
I change the file (to solve the conflict)
how to revert to 2 on a specific file without loss the other changed I make

Raful Chizkiyahu
- 364
- 2
- 15
0
votes
2 answers
Keep both binary files when there is a merge conflict in Git
Disclaimer
I realize I'm using git for something it's not really designed for. But I'm so close to getting it to do what I want. If you have a better idea let me know...
TL;DR
I want to keep both binary files when there is a merge conflict. I've…

Nathan
- 28
- 5
0
votes
1 answer
Fixing conflict in Git
I am using Github for manipulating files through a branch, on the way I did not pull the changes from a tsv file from the master to my branch and I updated a file in this format that eliminated the work done by the master and appears like a new…

Camilo160
- 101
- 2