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
0
votes
2 answers

git - resolving conflict by taking changes from pull?

I'm updating my code with git pull, but got commit conflict in one file. I want to take changes from pull and overwrite what was done in local repo. Is there some command to simply take changes from pull and overwrite local changes? Or do I need to…
Andrius
  • 19,658
  • 37
  • 143
  • 243
0
votes
2 answers

Git terminal is randomly trying to delete most/all of the modified files during a rebase

==== UPDATE: ==== Previously updated to say that upgrading my terminal to the current ver fixed the issue. But happened again today, so apparently that's not the case. /////////////////////////////////////////////////////////// Original…
relic
  • 1,662
  • 1
  • 16
  • 24
0
votes
2 answers

git return cannot merge error everytime after fix merge conflicts

After I wrote my code, I commit changes and I type git pull origin master to get other people changes. After that git said : CONFLICT (content): Merge conflict in file.c Automatic merge failed; fix conflicts and then commit the result. I type git…
utarid
  • 1,642
  • 4
  • 24
  • 38
0
votes
1 answer

Mercurial show diff against 2 parents or base during merge

Our teem recently faced with merge that removes one leaf of merge and we "lost" changes (as if you perform hg merge --tool internal:local). This happen because we don't experienced with hg merge command. hg diff shown only one difference, but not…
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
0
votes
1 answer

Git rebase workflow issues

There are many posts / questions / blogs about git rebase workflow. The following is what I understood and performed: Rebase the local master to upstream git fetch upstream git rebase upstream/master git reset --hard upstream/master Rebase the…
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
0
votes
2 answers

What happens to the rest of the files when git merge fails?

When there are conflicts in the merge, does git merge the rest of the files with no conflicts? For example, there are 10 different files to be merged, 5 files merge successfully and the 6th fails. Do the remaining 4 files merge as well? I'm asking…
Vic
  • 2,655
  • 3
  • 18
  • 28
0
votes
1 answer

Convert tabs to spaces results in a git merge conflict

I'm trying to move a project from indenting with tabs to spaces. How can I merge this without resulting in a merge conflict with every commit from other developers which are using the code base with tabs? I found this "HowTo" but step 3 is a little…
Denny Crane
  • 637
  • 6
  • 19
0
votes
2 answers

CouchDB prevent replication on conflict

I want to be able to prevent a 'push' (or replication) to the central CouchDB instance from a user's local instance (where there are many users) if there are any conflicts - essentially copying the functionality from something like Git or Mercurial,…
0
votes
0 answers

Diverged branches, merge does not resolve the issue

I got this message when I run git status: Your branch and 'origin/develop' have diverged, and have 1 and 2 different commits each, respectively. I followed the usual steps to resolve the issue: git pull resolve conflicts git commit git push But I…
0x5C91
  • 3,360
  • 3
  • 31
  • 46
0
votes
1 answer

Team member overwrite git changes

Me and a friend are working on a small project hosted on Github. Neither of us are very experienced (clearly). I submitted a pull request that was successfully merged however, my friend did not update his local repository to include these latest…
Caster Troy
  • 2,796
  • 2
  • 25
  • 45
0
votes
0 answers

Git: syncing my fork and fixing conflicts

Hi I have forked a repository. Several months have passed and I want to get it back in sync with the original repo. I have added several extra files in my own repo and added some files to gitignore. I have read that you can do this online since…
JP Hellemons
  • 5,977
  • 11
  • 63
  • 128
0
votes
2 answers

Is it possible to avoid 'offset issues' when resolving merge conflicts?

Suppose you have 2 methods in a file: BASE ---- m1 m2 Now both developers modify the methods slightly. But one developer adds a new method at the top of the file MINE | THIERS --------+-------- m1' | m0 m2' | m1'' | …
Robert
  • 37,670
  • 37
  • 171
  • 213
0
votes
2 answers

Conflict while updating local repository using TortoiseSVN: what do the context menu items do?

I sometimes get conflicts when updating my working copy in TortoiseSVN, as I'm sure many of you do, and I just got rather confused with the options available in Tortoise's context menu. (I must have double-clicked so far...) Can someone please…
Christian
  • 6,070
  • 11
  • 53
  • 103
0
votes
2 answers

Why does a git merge with conflicts end up with me having .lock files?

I am doing a git merge. I got two conflicts: One in spec/controllers/vehicles/vehicle_controller_spec. The other in Gemfile.lock I resolved the conflict and I see the files I modified which I plan to add and commit. That is a process I've done…
Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
0
votes
0 answers

Mercurial mark as resolvedn (resolve -m) is not working

I have a Netbeans property file that had a conflict. I removed the conflict manually and attempted to resolve it using resolve -m, but mercurial does not seem to accept this mark: $ hg resolve -m RESTServices/nbproject/project.properties $ hg…
galactikuh
  • 765
  • 8
  • 18