我有一個包含在icons/
目錄中的SVG圖像的回購。試圖添加這些圖像回購失敗,和Git並顯示錯誤消息抱怨:因爲圖標Git忽略圖標文件?規則
The following paths are ignored by one of your .gitignore files:
public/img/icons/my-icon.svg
Use -f if you really want to add them.
當我使用git-check-ignore
追查被忽略的文件,我發現,從我的.gitignore_global
文件Icon?
規則是罪魁禍首。
$ git check-ignore -v public/img/icons/my-icon.svg
/Users/ryanatallah/.gitignore_global:42:Icon? public/img/icons/my-icon.svg
什麼可能是這個問題的優雅解決方案?
你爲什麼不乾脆從.gitignore_global中刪除'Icon?'這一行或修改它只匹配你想忽略的內容? – Njol
因爲我仍然希望Git忽略'Icon?'文件。 –
當你說你想忽略**圖標**文件,是否有另一種模式,而不是'Icon'?例如 - '* .ico' – TheCodeArtist