我想包含一些文件在忽略的目錄中,但得到以下內容。我如何包含它們?謝謝將文件添加到忽略的目錄中的Git
[[email protected] bidjunction]$ git add html/about-us.html
The following paths are ignored by one of your .gitignore files:
html/about-us.html
Use -f if you really want to add them.
fatal: no files added
[[email protected] bidjunction]$
我.gitignore
文件
[[email protected] bidjunction]$ cat .gitignore
/html/
/ayb_cache/
/ayb_resources/
#Some cache files in the main application
/ayb_application/lib/plugins/tinymce_plugins/imageManager/cache/
/ayb_application/lib/plugins/tinymce_plugins/image_purchased/cache/
/ayb_application/lib/plugins_3rd/tinymce_4.0.6/plugins/image/cache/
# Temp files often created by editors
*.~
# Track some files in html directory
!/html/css/
!/html/images/
!/html/scripts/
!/html/about-us.html
!/html/corporate.php
!/html/index.html
!/html/muse_manifest.xml
!/html/terms-and-conditions.html
[[email protected] bidjunction]$
您可以'GIT中添加--force yourFile'強制文件被添加到混帳不管'.gitignore'。 – Seiyria
@塞里亞。是的,我看到了答案,但想知道我爲什麼要做一些需要武力的事情。 – user1032531
你忽略了html目錄。這真的令人驚訝嗎? – FDinoff