1
git status

shows following message:

lit/1252-a-comparison-between-neural-networks-and-other-statistical-techniques-for-modeling-the-relationship-between-tobacco-and-alcohol-and-cancer.pdf: File name too long
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean.

This file was deleted, which I can confirm with a following command:

git ls-files --deleted

Output:

lit/1252-a-comparison-between-neural-networks-and-other-statistical-techniques-for-modeling-the-relationship-between-tobacco-and-alcohol-and-cancer.pdf

When I try to remove it with git ls-files --deleted | xargs git rm there is no effect, but I cannot commit changes to my repository until I remove this file.

I have also tried to use: git config --system core.longpaths true but without success.

I wonder how to resolve this issue?

Micha Wiedenmann
  • 19,979
  • 21
  • 92
  • 137
olyashevska
  • 427
  • 4
  • 18

1 Answers1

2

git rm --cached is the command you're looking for.

This answer gives more details on git's add/remove commands

Matt Slonetsky
  • 306
  • 1
  • 7