Questions tagged [git-merge-conflict]

Questions about resolving merge conflicts in Git.

See also

518 questions
0
votes
1 answer

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 with the code. How is this possible ? Often I…
0
votes
2 answers

git practice exercise ( merging two branch and dealing with conflict)

I have to clone this repo : https://github.com/glo2003/H21-tp1-git and integrate both branches which are : refactor/structure and fix/ingredients to the main branch Main currently looks like this : Framboise Banane Champignon refactor/structure has…
codetime
  • 209
  • 2
  • 9
0
votes
0 answers

Merge/rebase a commit with one file conflict, accept upstream, can't add and continue, can't skip or I'll lose newly added files

Sorry for the long title, but this is a very specific question. Let me describe it better. I am working in a branch, let's call it new-feature. I change some code, and I also add a new file. I merge or rebase from a branch that gets frequent…
moodboom
  • 6,225
  • 2
  • 41
  • 45
0
votes
1 answer

Git: delete remote conflict branch

I'd like to remove a branch that was created during a conflict on remote: git branch -r origin/master origin/master_SPITFIREMKV_Jun-26-221715-2020_Conflict I tried variations of git push origin --delete…
Pesche Helfer
  • 506
  • 1
  • 7
  • 17
0
votes
1 answer

How do I fix this conflict when using git revert?

I am trying to revert to an older commit but when I do, I get a merging conflict. Why does this happen? Command I used: git revert
user14347129
0
votes
1 answer

Rebase github pull request

I submitted a PR some time ago to a project and now I need to pull the master branch from the main tree into my branch and update the PR. Are those the right commands to do that? git fetch upstream/master git checkout git rebase…
Igor
  • 5,620
  • 11
  • 51
  • 103
0
votes
1 answer

Why did git pull change my code without throwing merge conflicts for all changes?

I commited a new feature locally, pulled from remote and got merge conflicts. After resolving them, my feature stopped working. I assumed that I made an error and asked a question about this yesterday. So I did a hard reset to my previous commit,…
cssdev
  • 59
  • 7
0
votes
0 answers

git conflict while pull from upstream

My local master regularly gets several commits behind from upstream pulled from other feature branches. Obviously, all PRs have conflicts resolved while merging to upstream. The thing is whenever I'm pulling the changes to my local, I've to face and…
Aman Ullah
  • 11
  • 1
0
votes
2 answers

why does git conflict occur during cherry-pick?

I've been using git for quite a while but I never really understood why merge conflicts happen. I learnt to resolve them quickly but I feel like not understanding why they happen makes me unhappy. The most common explanation is the same code region…
theluckyemil
  • 663
  • 1
  • 7
  • 16
0
votes
1 answer

how to resolve .pbxproj merge conflict using Atom?

If merge conflict is detected in .pbxproj file, which sign means the conflicted source? enter image description here which of these signs should i delete here?
dumbDev
  • 35
  • 5
0
votes
1 answer

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 insertion are adjacent to each other. Is there same way…
kdb
  • 4,098
  • 26
  • 49
0
votes
1 answer

Merge conflict issue - wrong file selected after merge

I'm having an issue with merging in git. I'm no git expert. I have two branches feature_branch and develop. Develop being a public branch. I have made some changes in feature_branch and I have created a MR and I'm getting a conflict. When resolving…
user1607072
  • 139
  • 1
  • 1
  • 3
0
votes
1 answer

How to get all conflicts together while rebasing?

I have been working on my feature branch and I have 10 commits on it. I raised an MR when I was done but the repo always does git rebase master before the MR is merged. So, now when I try to run the rebase from master, each of these 10 commits get…
Debanik Dawn
  • 797
  • 5
  • 28
0
votes
1 answer

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
Mythpills
  • 143
  • 1
  • 2
  • 11
0
votes
0 answers

How to solve the merge conflict after revert one of the branch

So I have branch A and B, I rolled back one commit on B, then created a merge request from A to B, then git is complaining about merge conflicts. I know if I checkout both branches locally, then resolve the conflicts locally then push A to git…
wawawa
  • 2,835
  • 6
  • 44
  • 105