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.
Questions tagged [merge-conflict-resolution]
755 questions
0
votes
1 answer
How to recover deleted files that were deleted during merging
I was trying to delete all the migration files on the master branch. Git prompted:
error: Merging is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm '
hint: as appropriate to mark…

EarlyCoder
- 1,213
- 2
- 18
- 42
0
votes
1 answer
Gerrit Web UI: Show change-set's that have a status of "Merge Conflict"
Is there a way in the Gerrit Web UI to show a list of change-set's that currently have a status of "Merge Conflict"?
Perhaps using a search bar query?
I tried these queries:
status:"Merge Conflict" -> showed all merged changes
status:Merge Conflict…

Jonathan.Brink
- 23,757
- 20
- 73
- 115
0
votes
1 answer
When resolving conflicts during a rebase, is there a native command for accepting both changes?
A merge conflict occurred during a rebase, and Git is now asking me to resolve the patch. In cases where both changes are acceptable, how do I tell Git to accept both changes without having to modify the file myself?
E.g. when both changes are…

neverendingqs
- 4,006
- 3
- 29
- 57
0
votes
1 answer
Delete few commits in Git branch before merge into master
We have three main branches. develop, uat and master. We are in the last week of current sprint. It has been decided to postpone one feature to the next release. That feature is already in uat environment. So team wants to keep it in uat branch. So…

Ela
- 419
- 1
- 6
- 20
0
votes
3 answers
Git: Conflicts merging multiple repositories into one directory keeping the history
I have several (~20) Git repositories that are non-overlapping in their files. I want to combine their master branches in a single (new) repository.
After some reading I came up with the following process.
Create destination repository (git init)…

taranion
- 631
- 1
- 6
- 17
0
votes
1 answer
TortoiseMerge indicates entire file as conflicted, then attempts to delete file
Usually, when I encounter merge conflicts in SVN upon updating my working copy, the lines or blocks that are conflicted are highlighted in TortoiseMerge. I can then choose to use "theirs" or "mine", or both in some way. In any case, I can see at one…

O. R. Mapper
- 20,083
- 9
- 69
- 114
0
votes
1 answer
Fix double-commit history
What does it mean when you have, on a branch (master, in this case), a list of duplicated commits (exact as the dev branch), but with a different date, but the same date?
The SourceTree graph looks like this (overly simplified):
| [master] e
| d
|…

zok
- 6,065
- 10
- 43
- 65
0
votes
1 answer
Automatically resolve conflict at specific lines using find/replace
There was some kind of misunderstanding which resulted in conflict in 100+ files. The conflict is very easy to resolve though. One set of files has:
// In .h files
virtual bool exec();
// in cpp files:
bool SomeClassName::exec() {
And the other set…

Tomáš Zato
- 50,171
- 52
- 268
- 778
0
votes
1 answer
fix the commits after rebase of a remote branch
I made a mistake when rebased commits on my branch and then pushing everything. Afterwards I made a few more commits and tried to merge master. I solved all the conflicts and now git status gives me "Everything uptodate".
However when I made a…

greyxray
- 362
- 2
- 12
0
votes
1 answer
Git conflict while merging a feature branch after keeping it up to date
The solution for "Keep feature branch up to date" with git is, to merge the master into the feature branch from time to time, for example if a there is a change implemented in the master branch which is needed by the feature branch, correct?
I have…

user3507003
- 359
- 4
- 17
0
votes
1 answer
When does Github provide auto-merge resolution?
Background:
I wrote a script to updating the copyrights on all the files in my team's github repository. There are over a hundred thousand files to update. I'm updating them 1 subdirectory at a time.
My question is, if I make a pull request after…

A Ton
- 1
0
votes
2 answers
How do squashed commits compare to non-squashed?
Suppose I have a master branch, and a dev branch. After working in the dev branch, I squash and merge it into master
git checkout master
git merge --squash dev
git commit
This makes a new commit, right? But it seems like running git checkout dev;…

Christopher Waugh
- 441
- 1
- 4
- 15
0
votes
1 answer
Getting lots of merge conflicts in the app/build/intermediate directory of my Android app
I was working on my Android app in a development branch. I am at a point where I want to merge my changes into master, I figured I'd use the method suggested in the answer here where I merge master into the dev branch to take care of any potential…

intA
- 2,513
- 12
- 41
- 66
0
votes
2 answers
How to handle the GitHub situation when `git pull upstream branch_name` gives conflicts when it shouldn't?
It is strange that there is merge conflict for the following steps:
I forked a repo foo on GitHub
I git clone this forked repo to my hard drive
After 3 days, somebody committed a lot of code to a branch xyz
So to make the branch exactly the same on…

nonopolarity
- 146,324
- 131
- 460
- 740
0
votes
1 answer
js is merged automatically in magento
When I disable js merge it is merged again automatically. I don't know how. I there any way to check why or how it is happening?
If js is merged Admin menu and submit button is not working. I tried to change the sequence of js files in main.xml as…

Tejas Gandhi
- 5
- 2