Git忽略不应忽略的文件夹

问题描述 投票:0回答:1

我从我的.gitignore更新了我的dotfiles

/.config/*
!/.config/tmuxinator/
/.vim/.netrwhist
/.vim/autoload/plug.vim
/.vim/plugged/

但是git仍然忽略了/.config/tmuxinator/目录:

~/dotfiles master*
❯ git check-ignore -v .config/tmuxinator ; echo $?
.gitignore:2:!/.config/tmuxinator/  .config/tmuxinator
0

~/dotfiles master*
❯ git add .config/tmuxinator

~/dotfiles master*
❯ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   .gitignore

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    .zsh/06_gem.zsh

no changes added to commit (use "git add" and/or "git commit -a")

~/dotfiles master*
❯ git --version
git version 2.19.1

我错过了什么吗?

我可以强制添加,但我想正确地做。

谢谢

git gitignore
1个回答
0
投票

好吧,下次,不要忘记在目标目录上添加一个文件......

所以这是一个用户/主席界面问题。 :-)

© www.soinside.com 2019 - 2024. All rights reserved.