Questions about resolving merge conflicts in Git.
Questions tagged [git-merge-conflict]
518 questions
0
votes
1 answer
Review merge actions with KDiff after successful automated solving of merge conflicts
I use KDiff as a merge tool with Git. After an unsuccessful Git Merge, I started solving conflicts for individual files with git mergetool, which calls KDiff as specified in my config.
However for one file it said "Number of conflicts : x. Number of…

Charles
- 988
- 1
- 11
- 28
0
votes
2 answers
git - can't merge branch into master, conflicting files
I have a file called index.html in master branch. I create dev branch and switch into the dev branch
git branch dev
git checkout dev
I then edit index.html and commit the change
git commit -m "first change" index.html
I am still in the dev branch.…

argabri
- 1
- 1
- 1
0
votes
2 answers
What's the default version of a binary marked as both modified in Git?
If the conflict happen on a binary or any non-text files that can't be resolved by using text editor, I should use git checkout --theirs or git checkout --ours instead, then add them into the staging area.
But, if I just do nothing, add those…

Corey
- 1,217
- 3
- 22
- 39
0
votes
0 answers
Using Git-hooks to prevent merging certain branches
At work we have a GIT-branching model where every major release version of our product has a separate branch.
The V2.0 branch contains all commits that the v1.0 branch has plus additional work done on v2.0 of the product. V3.0 contains all commits…

Bram van der Giessen
- 112
- 7
0
votes
1 answer
Git merge issues - avoid conflicts and confusion
I have been working with git from quite while. But whenever there is a situation where I have to create new branch and merge it, I personally avoid it because I have faced a lot of issues while doing it for one of my project. Which was ruined after…

Khan Sharukh
- 1,151
- 12
- 21
0
votes
2 answers
Prevent git conflict markers
I looked quite thoroughly yo find an answer to this and was not able too. Is there a simple way to prevent git from appending conflict markers to conflicted files when merging. I'd like to prevent git from adding "<<<< ==== -----" when there is a…

RBL92
- 21
- 3
0
votes
1 answer
Resolve merge conflicts that git is not detecting
I've read a lot of different answers, but none of them seem to deal with my situation.
Git doesn't think there are any merge conflicts (this doesn't print out anything), but it's left a bunch of conflict markers in different files of mine that…

Pro Q
- 4,391
- 4
- 43
- 92
0
votes
3 answers
When I merge two branches which has a file with difference on same line conflict doesn't occur..how?
Consider there is a branch A. I created 2 branches A1,A2 from branch A. Again created a branch A21 from branch A2.. I changed line no 2 in X file and did commit and push to A21. Now I merged these changed to A2.. Now i changed the checkout to A2.…
0
votes
0 answers
Is it possible to set specific files in git to always merge as --our?
I have a file that has a list of feature acceptance tests I desire to be executed in Jenkins during pull requests. This file needs to be checked in so that Jenkins has access to it, but it also means it will be different on every branch, depending…

Xyern
- 1
- 2
0
votes
1 answer
Git cherry-pick to integration branch and then revert the original commit from feature branch
What would be the consequences of reverting the original commit while the same had been cherry-picked to the target branch?
There is a branch (say feature) with some changes (commit: A), while this change was expected to be in another branch (say…

Satyendra
- 1,635
- 3
- 19
- 33
0
votes
1 answer
Unable to add deleted files to index after git branch merge
In an Eclipse (Oxygen.3a Release (4.7.3a)) java project, I merged two branches and resolved all conflicts, getting no compilation errors and all tests to pass.
However, EGit (4.9.2.201712150930-r) won't let me add deleted files to the index/stage.…

user118967
- 4,895
- 5
- 33
- 54
0
votes
1 answer
PyCharm: conflicting file is displaying as a normal file
The problem is that after some commits into different branches, I've got a merging conflict.
I decided to resolve it via PyCharm, but VCS->Git->Resolve Conflicts is disabled.
After, I looked into Local changes and the file with conflicts is blue…

smart
- 1,975
- 5
- 26
- 46
0
votes
1 answer
How to create a git pull --rebase conflict for testcase?
I would like to create a test case that solves a rebase conflict, but first I need a way to cause the rebase conflict when doing a git pull --rebase.
Is there a programmatic way of creating a rebase conflict scenario?
The test will be for a…

Haibrayn González
- 171
- 12
0
votes
1 answer
File conflict resolution in Feature branch
We started using GitHub as Source control in our project recently and we are using Feature branches to work on the features. Once we are done with our development, we merge it to the develop branch using pull request.
During the merge if there are…

Anee
- 463
- 9
- 26
0
votes
2 answers
Git rebase conflict: many files deleted locally, and modified on remote. How to `git rm` all of them?
I'm on branch feature and rebasing onto master and histories have diverged. In feature dozens of files have been deleted that have at the same time been modified on master.
I'm sure I don't need these files anymore, so rebase, keeping what's on…

Dmitry Avtonomov
- 8,747
- 4
- 32
- 45