Questions tagged [conflict]

DO NOT USE THIS TAG. Instead try to use something more specific like name-collision, failed-installation, merge-conflict-resolution, conflicting-libraries etc (see also the meta discussion: https://meta.stackoverflow.com/questions/284369/end-the-conflict)

DO NOT USE THIS TAG. See the meta discussion

1652 questions
397
votes
14 answers

Android: View.setID(int id) programmatically - how to avoid ID conflicts?

I'm adding TextViews programmatically in a for-loop and add them to an ArrayList. How do I use TextView.setId(int id)? What Integer ID do I come up with so it doesn't conflict with other IDs?
znq
  • 44,613
  • 41
  • 116
  • 144
254
votes
4 answers

Why is a 3-way merge advantageous over a 2-way merge?

Wikipedia says a 3-way merge is less error-prone than a 2-way merge, and often times doesn't need user intervention. Why is this the case? An example where a 3-way merge succeeds and a 2-way merge fails would be helpful.
Johannes Bittner
  • 3,503
  • 2
  • 23
  • 21
212
votes
2 answers

How can I discard remote changes and mark a file as "resolved"?

I have some local files, I pull from remote branch and there are conflicts. I know that I would like to keep my local changes and ignore the remote changes causing conflicts. Is there a command I can use to in effect say "mark all conflicts as…
Tom DeMille
  • 3,207
  • 3
  • 23
  • 30
205
votes
4 answers

git rebase, keeping track of 'local' and 'remote'

When doing a git rebase, I often have difficulty working out what is happening with the 'local' and 'remote' when resolving conflicts. I sometimes have the impression that they swap sides from one commit to the next. This is probably (definitely)…
Benjol
  • 63,995
  • 54
  • 186
  • 268
194
votes
11 answers

How do I manage conflicts with git submodules?

I have a git superproject that references several submodules and I am trying to lock down a workflow for the rest of the my project members to work within. For this question, lets say my superproject is called supery and the submodule is called…
Tyler
  • 3,539
  • 3
  • 18
  • 14
168
votes
6 answers

Git resolve conflict using --ours/--theirs for all files

Is there a way to resolve conflict for all files using checkout --ours and --theirs? I know that you can do it for individual files but couldn't find a way to do it for all.
exe163
  • 1,781
  • 3
  • 12
  • 5
157
votes
14 answers

Conflict: Multiple assets emit to the same filename

I'm a webpack rookie who wants to learn all about it. I came across a conflict when running my webpack telling me: ERROR in chunk html [entry] app.js Conflict: Multiple assets emit to the same filename app.js What should I do to avoid the…
Andreasrein
  • 1,616
  • 2
  • 11
  • 10
131
votes
5 answers

How does 'git merge' work in details?

I want to know an exact algorithm (or near that) behind 'git merge'. The answers at least to these sub-questions will be helpful: How does git detect the context of a particular non-conflicting change? How does git find out that there is a conflict…
abyss.7
  • 13,882
  • 11
  • 56
  • 100
129
votes
13 answers

What should I do if two libraries provide a function with the same name generating a conflict?

What should I do if I have two libraries that provide functions with equivalent names?
qeek
  • 2,010
  • 2
  • 16
  • 23
114
votes
3 answers

Force Git to always choose the newer version during a merge?

Let's assume I merge git and there is a merge conflict. My question is: how can I force git to always choose the newer version of code in conflict so I won't need to resolve the conflict by hand?
bartek
  • 2,921
  • 5
  • 26
  • 30
101
votes
9 answers

Gesture recognizer and button actions

I have a view hierarchy that looks something like this: UIView (A) UIView > UIImageView UIView > UIView (B) UIView > UIView (B) > Rounded Rect Button UIView > UIView (B) > UIImageView UIView > UIView (B) > UILabel I've attached gesture…
Mustafa
  • 20,504
  • 42
  • 146
  • 209
89
votes
8 answers

How to use the default git commit message after resolving merge conflicts?

After doing a merge and resolving conflicts, is there an "easy" way to just accept the default generated commit message from the command line? One of our developers will resolve all the conflicts, and then do a git commit -m"Merge Commit" which…
yoyodyn
  • 1,587
  • 1
  • 11
  • 9
85
votes
3 answers

Git - how to force merge conflict and manual merge on selected file

We maintain web application which has common master branch and many parallel branches, one for each installation, each have few specific changes. Source code is managed in git and it is terrific tool when we need transfer features and bugfixes from…
Stepan
  • 1,430
  • 2
  • 14
  • 11
85
votes
13 answers

How to merge conflicts (file project.pbxproj) in Xcode use svn?

There are two members in our team. We use Xcode's SCM (use SVN) to manger our source code files. We all add files to our Xcode project. He has committed to SVN server. When I update, Xcode find there has conflicts in project.pbxproj file. Then I…
vcLwei
  • 1,927
  • 3
  • 16
  • 13
79
votes
4 answers

R: 2 functions with the same name in 2 different packages

I need to load to R packages : tseries and chron Both have a function named is.weekend I always have in my environment the function from the second package I loaded. How can I access always the function from, let say, chron ?
RockScience
  • 17,932
  • 26
  • 89
  • 125
1
2 3
99 100