Questions tagged [git-merge-conflict]

Questions about resolving merge conflicts in Git.

See also

518 questions
0
votes
0 answers

Which Git mergetools can I use with a custom merge driver?

I have written a custom merge driver for JSON which outputs diff3 format. All good visual mergetools I have tried insist on re-merging the file before showing the GUI. Are there any tools which can use the conflictfile with <<<<<<< ||||||| =======…
Vulume
  • 15
  • 5
0
votes
1 answer

your branch and 'origin/master' have diverged

My origin master and local master have diverged as below. I want to ignore the changes in origin/master and be able to push my local changes to origin master. I did git pull followed by git stash and tried to push but that did not help. I don't want…
Zack
  • 2,078
  • 10
  • 33
  • 58
0
votes
2 answers

avoid auto merging of git conflicts and warn if same files getting modified in different branches

Usually when we merge feature branch with master or any other branch and if same file is modified in different branches but on different lines then GIT does resolve the conflict automatically. We dont want these merge happened automatically and…
NitinK
  • 103
  • 1
  • 7
0
votes
0 answers

master throwing conflicts everytime I merge back to it

Basically, whatever modifications I do in a single file, when I get to push to master, conflicts happens on those specific places. So imagine I only modify 3 comments in a file, then I would get conflict in those 3 specific lines. What I do is…
bwk4u
  • 25
  • 7
0
votes
2 answers

Moved files into folders in master. Now branches have merge conflicts

Our project has too many files. So on the master branch, I moved the files into folders and now it looks clean. However when I merged master into all the other branches (so they have the latest updates), they have merge conflicts that I don't…
AskYous
  • 4,332
  • 9
  • 46
  • 82
0
votes
1 answer

How do I resolve a branch and orgin/branch that have diverged?

Through a reset to an earlier commit, I cannot get my local branch back in order. I keep getting merge conflicts locally, while the version on remote does not have any conflicts and what I want, is to get an exact copy of the fremote in my local…
stdcerr
  • 13,725
  • 25
  • 71
  • 128
0
votes
1 answer

What is best git workflow to keep a forked project uptodate with upstream project?

I am maintaining a forked version of another Free Software project. It offers few extra features that cannot be merged with the upstream at the moment. And I want to keep this fork, up to date with the latest updates of the upstream project. This is…
0
votes
1 answer

What is happening behind the scenes, with the commits and HEAD while trying to git reset --soft and undoing it?

I Issued git reset --soft HEAD~1 then I decided not to do this, I want to go back to my previous state. So, I searched in Stack Overflow, then I got this answer: Now I just want to go back to the time before I issued the reset If you only want to…
Arpan Banerjee
  • 826
  • 12
  • 25
0
votes
1 answer

Resolve git auto merge from release branch to master conflict

I don't even know how to summarize this issue, so having a hard time searching for similar questions. My company has our repos setup so that work for our next release is done by creating a branch from the master branch, making changes, then merging…
Brent212
  • 1,835
  • 4
  • 19
  • 23
0
votes
1 answer

How to update a forked repo that has an unaccepted pulled request of some commits

I followed the next tutorial https://medium.com/@topspinj/how-to-git-rebase-into-a-forked-repo-c9f05e821c8a this is my actual repo: As you can see there are two commits in my pull request and one commit in the original repository. I want to update…
Osiris
  • 160
  • 1
  • 8
0
votes
0 answers

Git rebase adding one commit created conflicts in files not related to commit?

I had a git history like this: master feature v v o----o-----o----o----o I checked out master, then altered and committed file.txt, which existed in both branches: git checkout master ...altered file git add…
symlink
  • 11,984
  • 7
  • 29
  • 50
0
votes
1 answer

Merge submodule while there is a folder by the same name in branch

Here M means Master, MS means Master with submodule and FB means a FooBranch. The FooBranch has been created from master at point Mb. At point MSd, a sub-directory named FooDir in master has been changed into a submodule. Now, master should be…
0
votes
2 answers

I have been creating new Git branches from older branch without checking out to the master

I have been checking out to new branches from the older branch, instead of checking out to the master. currently, I have created four new features: home_feature, admin_user-feature, customer_request, blog_feature. I forgot to checkout to the master…
0
votes
1 answer

How can I resolve file naming conflicts between Git branches?

1) Branch firstBranch: rename /frontends/myfrontend/utils/myfile.js to /frontends/myfrontend/utils/myfile2.js 2) Branch secondBranch rename /frontends/myfrontend to /frontends/myfrontend2 Now I want to merge firstBranch into secondBranch, while…
lqbweb
  • 1,684
  • 3
  • 19
  • 33
0
votes
1 answer

New files while resolving the merge conflict in Git

I am fairly new to Git so apologies if this sounds like a trivial issue. I committed some code yesterday in Git in my featured branch. Today when it was reviewed and approved, I am trying to merge into the develop and getting merge conflicts. Today…