Questions tagged [git-merge-conflict]

Questions about resolving merge conflicts in Git.

See also

518 questions
55
votes
2 answers

Why do I have to resolve the same "git rebase" conflict over and over?

When I do git rebase branch1 in my branch1-local I get conflicts. I solve the conflict, do git add and then do git rebase --continue as git asks me to do. After that a new commit is applied. A new conflict shows up. But is the same…
lurscher
  • 25,930
  • 29
  • 122
  • 185
23
votes
1 answer

GitHub Pull Request complex conflicts

GitHub added a feature about a month ago to resolve merge conflicts on the web interface, however it only works for "simple" merge conflicts: No conflicts Simple conflicts Complex conflicts In the blog post that introduced the new feature, GitHub…
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
23
votes
2 answers

Git Merge Conflict - Remote File Deleted, Local File Changed

I merged in changes from another branch but I am getting conflicts because a file has been deleted on the remote branch but has changes on local branch. I would like to delete the file - I tried git rm path/to/file but it says file: needs merge.…
xylar
  • 7,433
  • 17
  • 55
  • 100
22
votes
2 answers

"This branch has conflicts that must be resolved" but it's already merged

I merged a PR with the GitHub web interface, which resolved in a successful merge commit. Afterwards, GitHub is complaining This branch has conflicts that must be resolved. Does anybody know why or how to get the status merged?
21
votes
7 answers

Git merge conflict only on version tag in pom.xml

Is there a way to avoid merge conflicts in version tag in pom.xml when merging master into a branch? I have quite a few pom files, 80, and all of them have same version which is different from one in master. It's laborious and time-consuming to…
Abidi
  • 7,846
  • 14
  • 43
  • 65
19
votes
1 answer

How to solve git conflicts in Xcode project files (pbxproj)?

I have always solved this problem by using a merge strategy of the other members directory structure shall prevail, then confirming that there are no conflicts and mending it to what directory structure I want. But is there another better way to…
iforvert
  • 310
  • 1
  • 3
  • 10
18
votes
3 answers

Can't resolve merge conflict with git submodule folder

I have two git branches, develop and redesign that I need to merge. I have a submodule called library where its updates are being tracked by develop. When I run 'git merge' it says library has been modified by both even though I haven't touched the…
mdailey77
  • 1,673
  • 4
  • 26
  • 52
18
votes
3 answers

Git - how to automatically resolve "deleted by us" conflict when cherry-picking

I run the following command: git cherry-pick SHA --strategy-option theirs and get a conflict like this waiting for manual resolution: deleted by us: SOME_FILE Is there a way to make git automatically resolve such conflicts by adding files deleted…
Legat
  • 1,379
  • 3
  • 11
  • 20
17
votes
3 answers

How to use XCode's mergetool to resolve conflicts?

I'm in the middle of a rebase and I need to fix some merge conflicts. When I open the file in XCode, I see the source control conflict markers (<<<<<<<, etc) in the file. How can I use XCode's mergetool to resolve these conflicts in a graphical…
15
votes
4 answers

Git rebase, fix conflicts, then push is rejected

When I rebase, and there are conflicts which I then resolve, I get the following message: hint: Updates were rejected because the tip of your current branch is behind We have 2 branches: master is our base feature/fix-input-height (new feature…
Riveascore
  • 1,724
  • 4
  • 26
  • 46
15
votes
2 answers

How do I resolve git merge conflicts on a submodule from `git stash pop`

I have a git repository with a submodule. I need to pop changes I've previously stashed. However, this is causing a merge conflict on the submodule reference. I want to keep my changes from the stash, except for the submodule. For most code files, I…
Mashmagar
  • 2,556
  • 2
  • 29
  • 38
15
votes
4 answers

How to have meld as git mergetool to only show conflict and not differences?

When I use meld as git mergetool for solving conflict while merging, meld shows me the differences between local/output and remote/output files (in blue or green) that git automatically solves, and not only the actual conflicts (that are red…
janou195
  • 1,175
  • 2
  • 10
  • 25
13
votes
4 answers

How to merge branch to master on bitbucket

I have following questions. I want to create a branch from my master repo. I can use either bitbucket dashboard or Terminal to create a branch. If I used Terminal, the created branch does not show in Overview.but if I used Create a branch from…
bill
  • 854
  • 3
  • 17
  • 41
11
votes
1 answer

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 what I am getting after pulling the changes And this is…
11
votes
3 answers

How to rebase my feature branch to development branch in git with least possible conflicts?

I have my feature branch which has exceeded around 30 or more commits. Meanwhile in development branch few other features have been pushed from other developers. Therefore, Everytime a new feature is published on development, I am asked to: Rebase…
Karan Desai
  • 3,012
  • 5
  • 32
  • 66
1
2
3
34 35