0

Occasionally when I run git pull, certain files appear with (conflict_on_<date>) at the end of the file. I don't know what is causing this, and searching on both Google and Stack has offered no results. The files don't always have changes, and some of the duplicate files with conflict_on in the name are git-ignored files.

Process:

  1. Have an environment.ts file (gitignored, with local changes)
  2. Run git pull
  3. A file is created in the same directory as environment.ts, named environment (conflict_on_12-16-21).ts

Running this on Mac OS Monterey on a M1 pro chip mac. Sometimes use git desktop, sometimes use git command line. Git version 2.30.1

What is causing this and how can I stop it from happening?

Paul
  • 817
  • 1
  • 10
  • 25
  • Are you using a cloud-synced directory as your working tree? (e.g., iCloud or google drive) If so, that's the problem; don't do that. – torek Dec 16 '21 at 20:39

1 Answers1

1

Is this in Jetbrains IDE? Sounds like a file cache conflict

If an external process changes a file that was opened and unsaved in PhpStorm, it results in two conflicting versions of the file

Klas Mellbourn
  • 42,571
  • 24
  • 140
  • 158
  • 1
    This is happening in vscode, though now that you mention it, this file in particular does get modified by another process..hmmm – Paul Dec 16 '21 at 18:04