Questions about resolving merge conflicts in Git.
Questions tagged [git-merge-conflict]
518 questions
0
votes
0 answers
Filter unmerged files which have conflict markers
I develop tools for manage git repositories.
I have to develop custom git commit command ,
it will be a wrapper for native git commit with some checks.
On my custom commit i can call git commit when and only when repository doesn't have a…

Romillion
- 101
- 1
- 3
0
votes
0 answers
How to get %mine vs %remote in the merge tool when dealing with a merge conflict in git?
Current behavior :
Git does a good job of automatically merging changes.
When it doesn't, it creates following file : .base, .remote, .local and .merged and we need to manually resolve the conflict in file .merge.
Unfortunately, git has already…

AXMIM
- 2,424
- 1
- 20
- 38
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
0 answers
Git merge ISSUE not picking up all changes from the incoming branch
I am facing weird behaviour in git merge when resolving conflicts in some big files where some lines of code from the incoming branch are simply ignored generating syntax and other errors.
One of the various examples :
Following is the code current…

Nishant
- 13
- 4
0
votes
1 answer
bitbucket - solve conflicts and preserve atomic feature branches
Given the following git workflow:
a feature branch fb1 is created from master branch (production stable codebase)
when dev done a pull-request is created, then fb1 is merged to release-branch-1.x.x
another feature branch fb2 is created from…

Radu
- 1,159
- 3
- 22
- 40
0
votes
1 answer
Update my git branch followed by svn repository changes in git-svn
I'm using 'git svn' to clone source from svn repository.
And use a branch to create new features.
The git log graph like
S1-S2+S3-S4-S5-S6-S7 (master)
+B1-B2-...-B9 (new-feature)
The newest svn version is 'S7' and the latest local branch is…

Daniel YC Lin
- 15,050
- 18
- 63
- 96
0
votes
2 answers
Git conflict on second attempt to merge from branch to master
Considering the following git network and flow:
feature-foo _._._2_._._
/ \
master __1__/__._.3____._._\___4__5_________7_ (now: 1.1.0-SNAPSHOT)
\
release-1.0.x …

Khosrow
- 556
- 1
- 6
- 16
0
votes
1 answer
Git conflict markers appearing in a diff without being previously committed
A colleague has just pushed the results of their efforts to rebase/merge two branches (which they admit they struggled with) up to github. Here's a bit of the diff (mildly redacted):
diff --git a/portal/settings.py b/portal/settings.py
index…

TimB
- 5,714
- 2
- 26
- 30
0
votes
1 answer
What does the SmartGit conflict resolver actually mean?
So yeah, I am starting to get the hang of git and have been using SmartGit as the client. So far I am still learning a lot of the git language, but I know enough to understand the difference between merge and rebase for example.
Right now I'm in…

TheLemur
- 99
- 1
- 9
0
votes
1 answer
git rebase --onto fails
I created a local repository for learning git so losing data is not a problem.
Current tree:
* 006f7ab - (2 days ago) Merge branch 'hotfix' idc what will heppen :( - stav alfi (master
|\
| * 0f028e8 - (2 days ago) good - stav alfi
* | fc040d3 - (2…

Stav Alfi
- 13,139
- 23
- 99
- 171
0
votes
1 answer
Force checkout of the file after conflict from stash
I did git stash save then git pull git stash pop and now I have conflicts and I want to reset one file to be the same as from pull to remove changes from stash (I have other changes in other files that I wan to keep).
I've tried:
git checkout -f…

jcubic
- 61,973
- 54
- 229
- 402
0
votes
3 answers
Git merge conflicts, don't want to remove anything
I have a merge conflict in a pull request:
@import "includes/_variables.scss";
@import "includes/_mixins.scss";
@import "includes/relatedProducts/_styles.scss";
<<<<<<< HEAD
=======
@import "includes/stickyHeader/_styles.scss";
>>>>>>>…

rits
- 1,474
- 7
- 29
- 49
0
votes
1 answer
While Git rebasing, and fixing the conflict, the file doesn't appear to be modified anymore
I am trying to do a git rebase to master. I have 28 rebases. So, on some stages, I get conflicts. I make the adjustments, then I do git status, and the modified files appear. However, when I do git add {filename}, sometimes the files disappear from…

Suthan Bala
- 3,209
- 5
- 34
- 59
0
votes
1 answer
Why does path-restricted 'git log' omit merge commits with interesting conflict resolutions?
If a file's history includes a merge commit with an "interesting" conflict resolution, git log will skip over it. Why is this, and how can I make that commit be included?
(By "interesting", I mean a resolution that doesn't just take the version…

Matt McHenry
- 20,009
- 8
- 65
- 64
0
votes
1 answer
Understanding Git conflict cause
We work with 3 "main" branches, dev, uat, and master. We then use "feature" branches for any new work, branching from master, then merging back dev, PR to uat, master.
During the PR to uat, one dev in particular, sees almost constant merge conflicts…

mediaashley
- 342
- 1
- 3
- 8