0

I've read a lot of different answers, but none of them seem to deal with my situation.

Git doesn't think there are any merge conflicts (this doesn't print out anything), but it's left a bunch of conflict markers in different files of mine that causes them not to run.

I can go through and edit all of these by hand, but it will be a hassle.

Is there any way to force git to realize that these markers are there and help me deal with them?

Pro Q
  • 4,391
  • 4
  • 43
  • 92
  • 1
    These markers could be here from a past merge where conflicts would have been handled badly (i.e. eveything added without actually resolving anything). Did you track since when these markers were in your codebase? If it's not too far in the history, maybe consider rewinding your branch to the point before the merge and redoing it properly? – Romain Valeri Oct 24 '18 at 13:31
  • The markers are just text. Like @RomainValeri said, these have likely been left after an incomplete merge. – evolutionxbox Oct 24 '18 at 13:39
  • It's a couple commits away. I think I did a rebase or something like that which may have caused the issue. I was able to go in and fix it by hand; there were less than I originally thought there were. – Pro Q Oct 24 '18 at 13:53
  • @evolutionxbox Yep, I'm aware the markers are just text; they always are. But sometimes git mergetool or atom's git software is able to tell me things like "this is what so-and-so did, do you want to keep that, or keep what you did?" and I can just click a button and it's a lot easier. I'm wondering if there's any way to force git (or any other program) to do that for me. What I ended up doing was using "git log " to figure out whose commit was whose and then just editing it by hand, but it would be really nice if git did that automatically for me. – Pro Q Oct 24 '18 at 13:55
  • Git does when it’s a merge conflict state. However if someone says “nah that’s fine” then git is like “alright then dude”. – evolutionxbox Oct 24 '18 at 15:42
  • @evolutionxbox I'm curious if there's any way to force it to panic and be like "woah, that's so not okay dude, you gotta fix that!" – Pro Q Oct 24 '18 at 20:38
  • 2
    I did some research, and I can get git into a merge state, but I have yet to find a way where it detects the conflicted files. It's certainly not automatic. - [Force file unmerged](https://stackoverflow.com/questions/1869530/how-do-i-force-git-to-think-a-file-is-unmerged) - [Valid git folder in merge state](https://github.com/smashwilson/merge-conflicts/tree/master/spec/fixtures/merging.git) – evolutionxbox Oct 25 '18 at 13:57

1 Answers1

0

The following worked for me (where FILE is the 'full' path to the file, so the path plus filename):

TT--
  • 2,956
  • 1
  • 27
  • 46