[英]git ignore a directory not working
所以我創建了一個名為“ Repository”的新目錄,而無需添加,提交和推送
然后,我將此添加到我的.gitignore
/home/users/user/httpdocs/Repository/*
/home/users/user/httpdocs/Repository
我也這樣做了
cd /home/users/user/httpdocs/Repository
git update-index --assume-unchanged $(git ls-files | tr '\\n' ' ')
但是每當我執行git status時,目錄仍會出現:
Untracked files: # (use "git add <file>..." to include in what will be committed) # # Repository/ nothing added to commit but untracked files present (use "git add" to track)
我如何獲得該目錄從git狀態相應地消失
如果您的git repo位於/home/users/user/httpdocs
,則.gitignore
應該只需要Repository
。 .gitignore
路徑是相對的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.