Questions tagged [git-merge-conflict]

Questions about resolving merge conflicts in Git.

See also

518 questions
0
votes
1 answer

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 has: var version = 'upgradeRN' and my foo.txt in…
flix
  • 1,688
  • 3
  • 34
  • 64
0
votes
1 answer

The file has changed, but I can't find the details of the change in the commit history

I found that the file was changed, but I can't find more detailed information in the commit record。 I have tried git log -p --full-history filepath, then I got the result below: commit c59b1cd3a918d2807ed45faf32a7e88e4b3ffc70 Merge: d88b9ab9…
fbfatboy
  • 371
  • 1
  • 6
0
votes
1 answer

Set mergetool to only open certain extensions and use local files for others

I'm trying to merge two branches that have .py and .png files. Is there a way to set all the .png files to be local and only open with mergetool the .py files? I already did git checkout --ours / --theirs to choose the correct .png files to conserve…
Nelson
  • 67
  • 5
0
votes
3 answers

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 contained merge conflicts. I don't want to throw…
JesseTG
  • 2,025
  • 1
  • 24
  • 48
0
votes
1 answer

Why is there no merge conflict in git?

I have two branches, master and demand_prediction_module. contents of master branch are: contents of demand_prediction_module branch are: when I try to merge demand_prediction_module into master I should get a conflict for the file…
Jose_Peeterson
  • 145
  • 2
  • 8
0
votes
0 answers

Ignore specific files when resolving conflicts when rebasing

I have checked out a very old feature branch and would like to rebase master. However, there are webpack build files that aren't included in .gitignore which causes the rebase to prompt me to resolve conflicts for every commit of the feature branch…
deymbwoi
  • 125
  • 3
  • 10
0
votes
1 answer

How to push to remote repo after rebase without all previous added commit history?

I'm not good at git yet. I want to ask you, how the rebase with remote repo should be made. I mean, I have main branch (remote) and I also have branch eg. my_branch (local). When PR for merging my_branch to main was open, there was few more commits…
Yunnane
  • 85
  • 9
0
votes
2 answers

Is it possible to use the git merge tools on files that contain conflict markers (i.e., `<<<`, `===`, and `>>>`) *outside* a git repo?

Problem description When merging two branches in git with conflicting files, git adds markers to the conflicting areas. For example, a file with conflict would look like this Some code <<<<<<< HEAD Changes in branch A ||||||| cbf9a68 Original…
Amro
  • 130
  • 7
0
votes
1 answer

VSCode merge conflict don't show code conflict but other git gui tools show?

There is a conflict when I merge a branch: git merge main. I want to use main branch changes directly. when I use VSCode resolve conflict (main branch is on the left, my branch is on the right): I click "Accept All changes from left" button: Line…
riskers
  • 178
  • 13
0
votes
1 answer

ignore remote changes to a specific, ignored file

In our git repository for a latex project, pdf files are set to be ignored. Some still manage to push the compiled pdf, which makes the occasional pull a conflict between my local and the remote pdf, as it returns: "Your local changes to the…
restart4tw
  • 31
  • 3
0
votes
1 answer

git unable to merge unrelated histories shallow clone

I have shallow cloned a repo with depth 1 and create a local dev branch for development. After raising the PR, I have received merge conflicts, So I have pulled the latest master and tried to merge it with the dev branch. Approach 1: When I try to…
eoeo
  • 235
  • 2
  • 13
0
votes
1 answer

After fixing merge conflicts, too many changes to be committed that I didn't work on showed up

I know this could've been a question previously asked, but I am not sure it was answered properly. I am trying to fix merge conflicts when merging to the master branch. So what I did was, I checked out the master branch, did a git fetch, git pull,…
0
votes
0 answers

fatal : refusing to merge unrelated histories in git bash

"refusing to merge unrelated histories" message is showing in git bash when I try to merge two branch. In my project there are two branch respectively main and development. I have made some changes in development branch and want to merge with main…
Hasib
  • 31
  • 4
0
votes
1 answer

Git conflict between different branches

I have different feature branches and one main branch:- main feature1 feature2 feature3 feature2 and feature3 branches are behind master by a few commits. Before that feature1 branch is ahead of the main branch. Firstly feature3 needs to merged and…
PforPython
  • 58
  • 7
0
votes
1 answer

Git Merge with conflicts - Shows all files as mine

When I am doing a git merge with conflicts, I faced a small issue. Once I merge master into my feature branch let's say there are 10 files that came from a previous commit by someone else and two files conflict with mine. Then, I fixed the conflicts…
RandimaE
  • 39
  • 4