-1
Guys, the following situation serves only to exemplify what happens when I try to resolve a conflict over the Eclipse. I know how to resolve a conflict, the problem is that after solving it these tags remain present. Conflicts will always exist, I have no way of avoiding them in my project, and they are there to be resolved, and I know how to solve them. Well, follow the steps I follow:
By merging through Eclipse, from the master to the branch I’m working on, I come across a conflict.
- I do a Synchronize
- I select the conflicted file
- Right click, Merge Tool
- I do not change anything (Although sometimes I change and gives the same thing)
- Right click on the file again
- Add to index.
When I open the file I check that Eclipse saved it with this image tags below.
The strange thing is that Merge Tool offers the option of 3 editors when it shows the comparison. If I select Text Editor the conflict is solved without this problem, if I leave the default (default) problem happens.
It’s not the Eclipse that does it, it’s the Eclipse itself
git
(Eclipse menus only call git commands). Anyway, I think it’s interesting to know because conflicts arise, read https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts - knowing why they arise, it is easier to avoid (it is not always possible, of course, but at least you know why it happened). From the image you put it’s kind of hard to know, but think which is why these lines should have some whitespace or tabs on a branch and not in master (or vice versa), or something like...– hkotsubo
These are difficult conflicts to avoid, there are many people working on the same thing, but I know how to solve it well, the problem is precisely these tags that are added. And I think it’s the eclipse because if there in the compare view I use the text editor instead of the default, it saves normally without problem. But it’s one more job I’d like to avoid.
– Diego Carjan
It’s not eclipse, if you run git on the command line and you have conflict, it also adds these markups. Maybe the problem is another (someone has an auto-format config in the eclipse that removes spaces from empty lines and ends up creating conflict, for example - I don’t know, it’s what came to mind, it can be so many things, and only with the information of the question is difficult to guess). Anyway, if there’s too many people doing the same thing, there is another problem, and it is not git that will solve... :-)
– hkotsubo
if it is not the eclipse, why is it that by using a different editor in compare viw, the conflict is solved smoothly?
– Diego Carjan
What I meant is that if there is a conflict, it’s git that adds these markups (it puts the characters
>>>
in the archive). Now, if the conflict only occurs when you use the Eclipse, then that’s another story, and as I said, just with the information of the question, it’s hard to guess (have to see what each one is doing, it may be the auto-format issue I mentioned earlier, or some other detail that escapes me now...)– hkotsubo
I edited the question a little bit, what additional information do you need? vc uses the eclipse?
– Diego Carjan
I use Eclipse sometimes, but when I use git, I always go on the command line, so I never had this problem that you reported. Sorry I can’t be of more help...
– hkotsubo