Announcement

Collapse
No announcement yet.

Errors when commiting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Errors when commiting

    Git failed with a fatal error.
    error: 'Tools/DRGBackfill/DRGBackfillCode/Program.cs' appears as both a file and as a directory
    error: Tools/DRGBackfill/DRGBackfillCode/Program.cs: cannot add to the index - missing --add option?
    fatal: Unable to process path Tools/DRGBackfill/DRGBackfillCode/Program.cs

    I am unable to commit my changes. We are using GIT.

  • #2
    If you are running on a case-insensitive file system then perhaps Git has a record of one as a file (or directory) and the one in your working area is a directory (or file)? If so, then you need to know not to do that! Perhaps use "git mv" but you can't have 2 different directory entry objects that are identical on a case-insensitive file system (e.g. Windows). Don't do that.

    Or you changed one to the other and didn't use "git mv" to do the work of moving the old one out of the way? If so then revert and use "git mv".

    Let's focus on the 1st error and, fixing that, I expect the 2nd to go away.

    Also, you didn't say which git command actually failed???

    Comment


    • #3
      Originally posted by DougR View Post
      If you are running on a case-insensitive file system then perhaps Git has a record of one as a file (or directory) and the one in your working area is a directory (or file)? If so, then you need to know not to do that! Perhaps use "git mv" but you can't have 2 different directory entry objects that are identical on a case-insensitive file system (e.g. Windows). Don't do that.

      Or you changed one to the other and didn't use "git mv" to do the work of moving the old one out of the way? If so then revert and use "git mv".

      Let's focus on the 1st error and, fixing that, I expect the 2nd to go away.

      Also, you didn't say which git command actually failed???
      This is locally on my pc trying to check in
      We are using Git in VS not in Windows.Capture.PNG

      Comment


      • #4
        VS is Visual Studio, right? And the OPERATING SYSTEM is Windows, right? Then the local file system is case insensitive.

        Comment


        • #5
          Originally posted by DougR View Post
          VS is Visual Studio, right? And the OPERATING SYSTEM is Windows, right? Then the local file system is case insensitive.
          yes windows

          Comment


          • #6
            My co-worker had me do it via the operating system and finally worked! Had to push manually and commit changes.

            Comment


            • #7
              Probably a bug in Team Explorer/VS. Might want to file a report. Cheers.

              Comment

              Working...
              X