Questions about resolving merge conflicts in Git.
Questions tagged [git-merge-conflict]
518 questions
0
votes
0 answers
Is there an option to resolve this merge conflict automatically?
I have next merge conflict when merging release/77-fix:
<<<<<<< HEAD
# Distinguish e.g. staging from front-end-dev etc.
$environment_prefix = '.' . Proj::Env->host_group
if…

Eugen Konkov
- 22,193
- 17
- 108
- 158
0
votes
0 answers
How do I avoid conflicts in git when merging into a feature branch
We have a branch, which I'll call BR1, and which I'm on initially. I want to do some work for a future release, and so I pull (and build), and then create a feature branch with:
git checkout -b FBR1a
git push -u origin FBR1a
I make some changes,…

mconner
- 1,174
- 3
- 12
- 24
0
votes
1 answer
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
stuff in common between func1 and func2
<<<<<<< HEAD
more stuff (func1)
=======
…
0
votes
1 answer
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 would also have to resolve all the conflicts I…

uloco
- 2,283
- 4
- 22
- 37
0
votes
1 answer
Git merge show file conflicts but that file not changed in one side branch since the common ancestor(commit)
I have two branches version-1.0 and version-2.0, their common ancestor is commit C.
I try to merge the two branch and it shows a file a.txt conflicted.
for example:
$ git checkout version-2.0
$ git merge version-1.0
$ git status
Unmerged paths:
…

Adooo
- 640
- 6
- 22
0
votes
1 answer
How can we get the READY TO SUBMIT status of gerrit review via command line?
I want to get the list of all the reviews which are in READY TO SUBMIT state via command line (may be use some script to automate) and merge all those reviews.

Akshaya
- 3
- 1
0
votes
0 answers
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/lines that are not related to each other. I would…
user15672038
0
votes
1 answer
How to resolve easy merge conflicts automatically in Git
My code locally:
disableCaching()
setupGoogleMaps()
Change from remote:
disableCaching()
FirebaseApp.configure()
initializeNotificationService()
setupGoogleMaps()
For me, it seems obvious that two lines have been added…

TSR
- 17,242
- 27
- 93
- 197
0
votes
0 answers
Bitbucket showing conflicts in file changes but not at top
I'm trying to merge a new branch I have created into develop. There were merge conflicts on the branch which I resolved locally and then pushed the changes to Bitbucket.
Now, you can see here that there are no conflicts flagged and I can happily…

DevB1
- 1,235
- 3
- 17
- 43
0
votes
0 answers
How to force remote in a GIT modify/delete conflict?
When merging my branch, there are lots of those Modify/Delete conflicts. Too many to resolve manually.
When I do the
yes d | git mergetool
as described here: How do I fix a merge conflict due to removal of a file in a branch?, I can delete every…

Thomas B.
- 691
- 4
- 15
0
votes
0 answers
Improve git's suggestions for merge conflicts of adjacent hunks?
Related to my previous question Git merge conflict upon rebasing adjacent deletion and insertion?
By default, git's merge algorithm can give dangerous/unhelpful suggestions.
For instance, I have sometimes situations, where I want to push some code…

kdb
- 4,098
- 26
- 49
0
votes
1 answer
How not to have pull requests from one team member on GitHub overwrite my own CSS file?
Currently, I'm working on a PHP project with three team members on GH. We split up tasks, but came to the conclusion that when contributor1 codes one screen and styles it in our CSS file, this will all be lost when contributor2 would push their own…

Rix11
- 23
- 4
0
votes
1 answer
Git merge keep and commit conflicted state
I found some solutions to force an overwrite using ours or theirs strategies, but is there a way to just commit the merge in the conflicted state?
Before you ask why it's not for me, I'm just doing it for someone else.
e.g.
<<<<<<< HEAD
this is some…

mclslee
- 458
- 1
- 5
- 15
0
votes
2 answers
Git merge between master branch and outdated but with news lines feature branch, merge result wrong
Main branch:
-test.txt
-A
-B
-C
-D
Feature branch: branch out from main, and adds -E in a new line
In the meantime, line -C is deleted on main branch.
Now if I want to do a pull request, first i merge current main branch to my feature…

danni
- 11
0
votes
1 answer
How do I fix merge conflic in pubspec.yaml and pubspec.lock?
I stashed the recent change I have on my local machine, and then pull from the remote repository. Along the way, I encounted the below error. How can I merge my stash and also fix git conflict?
Auto-merging pubspec.yaml
CONFLICT (content): Merge…

Oluwatobiloba
- 29
- 6