2017-08-15 8 views
1
git status 

ショーは:ファイル名が長すぎます:削除するには?メッセージ次

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. 

このファイルは、私は次のコマンドで確認することができ、削除されました:

git ls-files --deleted 

出力:

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

私がしようgit ls-files --deleted | xargs git rmで削除しても効果はありませんが、私の変更をコミットできませんこのファイルを削除するまでリポジトリを削除します。

私はまた、使用しようとしました:git config --system core.longpaths trueしかし成功しません。

この問題を解決するにはどうすればいいですか?

+1

あなたはhttps://stackoverflow.com/questions/37279654/when-should-i-use-rm-([gitのRM --cached]みまし与えますgit-rm-git-rm-cached-git-add)をこのファイルに追加しますか? –

+0

ありがとう、それは私の問題を解決しました。 – olyashevska

+0

@MattSlonetskyあなたのコメントを回答として提供してください。 –

答えて

1

git rm --cachedあなたが探しているコマンドです。

This answerはgitのの追加/削除するコマンドの詳細について

関連する問題