Questions tagged [merge-conflict-resolution]

When merging branches in a version control system, a merge conflict might arise. This tag is for questions about how such conflicts can be resolved.

See also

755 questions
10
votes
1 answer

Intentionally create Merge Conflict

I have pulled the files from GitHub already. Now I need to create a merge-conflict. How do I intentionally create a merge conflict on GitHub?
MattP
  • 489
  • 1
  • 7
  • 16
10
votes
1 answer

Git stash pop with binary - merge conflict

I'm trying to do a "git stash pop" with a binary file. It results in a merge conflict. I just want to pull what's in the stash off and overwrite what's in the working directory. What is the easiest way to do that?
Mr Mikkél
  • 2,577
  • 4
  • 34
  • 52
10
votes
1 answer

Resolving Git conflicts in SourceTree

I was using NetBeans GIT plugin before, then I've decided to switch to SourceTree, as it is more efficient and powerful. As a newcomer to SourceTree I've managed to figure out basic Pull, Push and Commit workflows. However, I got stuck when there…
10
votes
1 answer

How to Merge Conflicts by Selecting Lines from Both?

I'm learning the use of version control (with Tortoise HG) so this question might be very basic, but I can't figure out how to solve it. Suppose Branch A has a text file with the following: A B C D E F Branch B has the same text file…
9
votes
2 answers

Github resolving conflicts always merges base branch to my current branch

I am working in my local branch in PHP Storm. After the task is done, I commit my branch and push to git. On Github page I create a Pull request DEV <- my branch. Dev is the base branch, to which I will merge my branch. This is ok till now. But in…
Darksymphony
  • 2,155
  • 30
  • 54
9
votes
2 answers

Always use version from merged branch on conflicts

Currently I am working in a feature branch that will soon be merged back into master. I recently tried just that and had some merge conflicts, which I had to fix manually. So, is it possible to tell git to always use the version from the merged…
Max
  • 15,693
  • 14
  • 81
  • 131
9
votes
1 answer

conflicts prevention while merging branches in Subversion

I have recently observed a very weird merge conflict in Subversion. I am using tortoise SVN as the client. Please find the below information of the Trunk and branch details: \trunk\ . Two users are working on this. \QA\ is the branch where the…
ankur
  • 557
  • 1
  • 10
  • 37
9
votes
3 answers

Viewing changes to deleted files in git

Let's say that when I branch off from master, there's a file colors.txt on the master branch of my repo with these contents: red green blue yellow I then branch off into my-branch, in which I make the following changes: Delete colors.txt Add…
ericmarkmartin
  • 717
  • 1
  • 8
  • 19
9
votes
3 answers

Feature backporting in Git / Subversion

What would be the preferred way to achieve the following workflow with either Git or Subversion (I have more interest in the Git version, but comparison will definitely be useful): Let's say we had a major release of the product recently and there…
Yippie-Ki-Yay
  • 22,026
  • 26
  • 90
  • 148
8
votes
1 answer

when exactly does a git merge conflict arise

I'm using git to track changes to my LaTeX documents. I tend to keep feedback from co-authors in a separate branch and merge it in later. So far things seem to magically merge properly, but I would like to know when exactly a merge conflict occurs,…
Octaviour
  • 745
  • 6
  • 18
8
votes
1 answer

Mercurial merge awesomeness - what am I missing?

I've been using Mercurial for a while, and there's one "fact" that is given many times. In fact, it hit me while watching a video made by Fogcreek yesterday, this video: Fog Creek Kiln: Unlock the power of DVCS for your company that there seems to…
Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825
8
votes
2 answers

git status and git diff empty after failed git am

I'm developing on a different machine than I usually do, and it seems that git is behaving differently than I remember. When I checkout a new branch git checkout -b , and try to apply a patch git am , the patch…
Nick Desaulniers
  • 2,046
  • 3
  • 25
  • 47
8
votes
2 answers

Search git branches for file in common

I would like to search git branches for any modified files in common between mine and all others, as a method of early conflict detection. Is there a method that git would allow me to do this that I'm overlooking (or via shell scripting)? The…
BLaZuRE
  • 2,356
  • 2
  • 26
  • 43
8
votes
2 answers

Why is bitbucket not automatically updating my pull request?

After pushing to a branch that's the subject of a pull request, I'm getting the message There are new commits not included in this pull request. Update now. Why am I getting this, rather than the pull request being automatically updated? The only…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
8
votes
1 answer

Bitbucket: Conflict in remote repo, can't figure out how to resolve

I hope I can express this properly... I have the following setup in Bitbucket (using Git protocol). I have a master repo that contains my application. I then fork the master repo per client in order to have the flexibility to make client specific…
Siraris
  • 1,088
  • 3
  • 13
  • 21