All Questions
Tagged with git-merge-conflict merge-conflict-resolution
95 questions
-2
votes
2
answers
107
views
Why Git can't merge on the server-side if there are no conflicts
I've been using Git for a long time in a lite mode: branch, pull-commit-push, merge. Mostly with SourceTree. That was enough for development. So I'm an amateur)
But now I've got a repository that is ...
0
votes
2
answers
188
views
How to resolve git conflict locally (with some constraints)?
I want to resolve a git merge conflict (between feature and test branches), but there are some limitations:
cannot push directly to test and master branches
cannot merge feature branch into the test ...
1
vote
1
answer
120
views
How to Auto-Resolve Git Subtree Conflicts with Three-Way Merge Strategy?
Hello Stack Overflow community,
I'm currently dealing with a scenario involving Git subtrees and conflicts. Here's a breakdown of my situation:
I have a repository A that includes repositories B and C ...
3
votes
1
answer
383
views
Git simple conflicts automatic resolution
According to JetBrains IDEs (IntelliJ IDEA, etc.), simple conflicts means non-overlapping character changes within the same line:
For simple conflicts (for example, if the beginning and the end of ...
-1
votes
1
answer
80
views
Github: Why revising a csv file in a branch results in a conflicting merge?
I'm sorry for this very basic question but I can't understand why revising a csv file that I pulled from the master would create a conflict in my pull request.
What happened is, I have a collaborative ...
0
votes
0
answers
38
views
git merge conflicts due to reverting: what strategies can be used to avoid such conflicts?
this images describes the issue we were facing
branch k had merged b2 into itself, which was a mistake, we actually did not want any b2 related changes going into k.
then k merged itself into b1, ...
0
votes
0
answers
54
views
Moving a line is not atomic in git
Imagine the following git flow:
R1 refactoring #1
/ \
/ \
---A------M1---M2--- master
\ /
\ /
R2----- refactoring #2
The code ...
2
votes
0
answers
71
views
incrementally rebase onto latest master
Let's say over past 8 hours, 2 PRs have merged to master. They are of medium size, not so huge, but not so small.
I'd like to incrementally rebase onto latest master. i.e., I'd like to rebase onto ...
0
votes
1
answer
50
views
Git merge disable auto apply code changes
I have a branch called upgradeRN and master, when i tried to pull master into upgradeRN there's some conflict files, so i used git pull --no-ff [remote] master
let say my foo.txt in upgradeRN branch ...
1
vote
3
answers
2k
views
How to list the files that caused a merge conflict in Git, even after you've resolved some of them?
I'm resolving a large merge conflict in a Git repository. Partway through the process, I realize that I may have resolved some conflicting files incorrectly. However, I don't remember which files had ...
11
votes
1
answer
3k
views
Not getting GitHub merge conflicts Top-bar in Visual Studio Code
I am having trouble getting this GitHub merge conflict Top-bar to resolve the conflicts in Visual Studio Code.
I have tried adding this command "editor.codeLens": true but no effect.
This is ...
0
votes
1
answer
83
views
Git incorrectly detects changes when in fact additive
I have this merge conflict:
<<<<<<< HEAD
async def func1():
stuff (func1)
=======
async def func2():
different stuff (func2)
>>>>>>> origin/master
...
0
votes
1
answer
728
views
Save merge conflict resolutions before git merge --abort
I am in the midst of a big merge request and already resolved a bunch of conflicts, when I realised that I want to run the merge command again with -Xignore-all-space. If I run git merge --abort I ...
0
votes
0
answers
218
views
How to gradually resolve merge conflicts
I work in a team, and while I try to update the branches I'm working on with the changes my teammates merged into our dev branch by rebasing or merging, sometimes, I have conflicts in various files/...
0
votes
1
answer
1k
views
How to fix merge conflict that involves commenting out one line, and un-commenting another?
I wanted to comment out <AppNavigator /> and un-comment <OnboardingNavigator />. Can someone explain why this is a merge conflict and how to resolve it? This is when I'm trying to do a PR ...
0
votes
1
answer
126
views
Detect same lines when git merge results in confict
I have a branch A and two child branches B1 and B2, that were created from it.
If I add single text/code line to a file in branch B1 and commit that change, then add the same line to the same file in ...
1
vote
3
answers
611
views
Resolving only some files in a git merge conflict
What if there's a merge conflict with two files.
Only person A is familiar with file A
and only person B is familiar with file B
I'm new to git.
So would it be possible for person A to resolve the ...
2
votes
1
answer
711
views
Github Desktop not displaying merge conflicts interface
I've always used github desktop for viewing my merge conflicts and also solving them, but recently that beautiful and bright interface has suddenly disappeared and I just can't find a way to get it ...
1
vote
1
answer
772
views
Why are lines missing during git merge
I'm attempting to merge master branch into new-branch.
I noticed git seems to be eating relevant lines in the output conflicted merged file. What should i be doing differently to achieve the expected ...
0
votes
0
answers
83
views
Reg; conflicts found while merging request github
We have found below conflicts while merging from bitbucket master branch to github master branch in one of the repositories.
we need to merge in master branch in github how to resolve these ...
1
vote
1
answer
84
views
Git merge resolve conflict readability
Here I simply the situation.
I have a JSON file in master, with the content like this
[
{
"aa": {
"type": "fixed",
"something": {
&...
1
vote
0
answers
551
views
VS Code compare changes, how to accept/reject
Today I discovered that VS Code automatically recognizes when I open a file that has merge conflicts. In the beginning, I see several commands available, including "compare changes". I like ...
0
votes
1
answer
889
views
Intellij apply conflicting merges
The below screenshot is from a rebase of one branch on top of another. There are a lot of conflicts like in the picture. They conflict, but if they were applied first one, then the other, they would ...
0
votes
1
answer
206
views
Automerge after patch apply with conflics
I have several repositories with "just the same" package.json and several config files. I have changes made in one repository and want to spread this changes on others. I managed to do just ...
0
votes
1
answer
2k
views
Visual studio code resolves some git conflicts on itself
My teammates use VS Code.
Very often when there is a conflict and they pull, they fix some conflicts manually, but it seems that some conflicts resolve themselves which leads to very very big problems ...
2
votes
3
answers
4k
views
How to automatically resolve multiple git conflicts under some path?
When merging branch Source into Target, I get ~1K conflicts and I've noticed the following:
All conflicted files under path MyRepo\SomeFolder\A\ should be picked from Source branch. E.g. "MyRepo\...
0
votes
1
answer
49
views
Git merge conflict upon rebasing adjacent deletion and insertion?
I am in the process of cleaning up a series of commits for pushing to the master branch.
In the process I am running into a recurring type of merge conflict, that appears when a deletion and an ...
2
votes
1
answer
46
views
GIT define simple conflict-resolving strategy
I came across sitaution, where developers on their own branches will modify one file - it's some kind of global file which is generated automatically.
The thing is, that this automatic generation ...
0
votes
1
answer
872
views
how to resolve git conflict where i want to keep a change and reject the file deletion in latest branch
CONFLICT (modify/delete): src/a.js deleted in aa1e4d and modified in HEAD. Version HEAD of src/a.js left in tree.
I want to keep what is there in the HEAD and reject the deletion in aa1e4d
4
votes
0
answers
1k
views
How to merge a PR w/conflicts in GitHub, **without** merging base into head (the other way) first?
in one of the repositories I work with some other folks on, we use pull requests as a way to manage our merges and sometimes we get merge conflicts (as normally happens). Here's the rub: other ...
4
votes
1
answer
1k
views
How to inspect manual conflict resolution in merge commits where the resolution is performed cleanly using one of the parents
Consider the following git log with the following commits
6752364 * Merge branch 'java-branch'
|\
b9e9e66 | * Add an unrelated file
14a7cb9 | * Change favorite language to Java
7b07a43 * | ...
0
votes
2
answers
1k
views
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 ...
0
votes
1
answer
91
views
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 ...
-1
votes
1
answer
54
views
Git raising conflicts for simple merges
I'm having issues with a BitBucket repository whereby, upon performing merges from one branch to another (this can be any branch, it happens regularly) it raises conflicts for very simple changes. For ...
1
vote
0
answers
37
views
git conflicts - is there an easy way to get differences between the sections of a conflict?
Given a conflict (or many) in a file, is it possible to easily get differences between the sections of a conflict? I mean, I know I can diff whole files from revisions and stuff but I also know it's ...
3
votes
2
answers
652
views
How can I see what "previous resolution" git applied?
When cherry-picking a commit with similar resolutions to a previously resolved patch I sometime see git saying it tried to re-apply what I'd done earlier. I believe this is the rerere component of git....
1
vote
0
answers
314
views
How do I prevent `git` from merging text lines if both sides have changes in the same file?
There are cases where git's automatic merging (patching) of text files produces bad outcome, due to logically conflicting changes, and I like to have those reported as a conflict instead of getting a ...
0
votes
1
answer
1k
views
Resolve git auto merge from release branch to master conflict
I don't even know how to summarize this issue, so having a hard time searching for similar questions.
My company has our repos setup so that work for our next release is done by creating a branch ...
1
vote
0
answers
2k
views
Trying to resolve a merge conflict involving a deleted file
This is the message I am getting
CONFLICT (modify/delete):
labs/lab14_observer_gui/new_code/web_code/web/my_web_server_command.cc deleted in HEAD and
modified in ...
1
vote
1
answer
874
views
Git make changes to single line on multiple branches and keep all changes
I have a really long line in my code that contains IDs for something. Here is an example of the line
const IDs="0,1,2,3,4"
I want to add to this line on multiple branches. Here's an example
Branch ...
0
votes
1
answer
4k
views
New files while resolving the merge conflict in Git
I am fairly new to Git so apologies if this sounds like a trivial issue. I committed some code yesterday in Git in my featured branch. Today when it was reviewed and approved, I am trying to merge ...
5
votes
2
answers
2k
views
Different scenarios for git merge conflicts
I am trying to understand which are the situations when a git conflict can happen after a git merge and how they could be avoided.
I've created a git repository and added a text file to it.
I've ...
1
vote
1
answer
1k
views
Resolving conflicts results in no changes added
Let's say I have a master branch, and a feature-a branch. feature-a is up for review but everyone is busy. I need to start feature-b but feature-b is dependent on code done in feature-a.
So up until ...
0
votes
1
answer
7k
views
How to do a BitBucket Pull Request Conflict Resolution in IntelliJ IDEA
So, lets say I have development branch, and opened a PR for my feature branch into development.
I have a conflict in say, 1 file (or 10, whatever) - bitbucket says what I need to do:
git checkout ...
148
votes
3
answers
180k
views
Difference between "Accept Current Change" and "Accept Incoming Change"
The problem occurs when changes conflict.
As you see in image given above that four options there are:
Accept Current Change
Accept Incoming Change
Accept Both Changes
Compare Changes
I want to ...
2
votes
0
answers
435
views
Resolve GIT merge conflicts in Tableau workbook TWB file
We are trying to set-up parallel development using git feature branches and faced an issue trying to resolve merge conflicts within tableau workbooks.
TWB files are actually XMLs of a complex ...
3
votes
1
answer
3k
views
How to keep both files from a “both added” merge conflict?
I want to merge a branch which added a file that I have added as well:
Unmerged paths:
(use "git add <file>..." to mark resolution)
both added: file
I want to resolve this ...
2
votes
1
answer
6k
views
Resolve PR Conflict in Azure DevOps without changing source branch
We have two restricted git branches in Azure DevOps,
test branch for UAT environment
master branch for Production Environment
The developers can't commit these branches directly, they must create ...
1
vote
1
answer
1k
views
How to resolve a conflict while merging two branches of a repo through a fork?
I'm in the middle of some weird Git mess.
This is the situation right now -
In my team's Git repo we are trying to merge from develop to release - we are getting a conflict in one of the files.
...
4
votes
2
answers
4k
views
Gerrit UI showing status as merge conflict even when there is no conflict
One of my outgoing review was showing merge conflict (not submitted, in process). I fetched the latest from master and then merged that with my feature branch and updated my change list on gerrit. But ...