1. 程式人生 > 其它 >git不跟蹤某個檔案/資料夾

git不跟蹤某個檔案/資料夾

技術標籤:後端gitlinuxvim

git不跟蹤某個檔案/資料夾

編輯當前目錄下.git/info/exclude檔案

vim .git/info/exclude

我需要取消跟蹤idea

# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa] # *~ .DS_Store .idea

檔案一樣的操作
wq儲存即可
git status檢視

$git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean