我从dotfiles这样.gitignore
更新了
/.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
我错过了什么吗?
我可以强制添加,但是我想正确地做。
谢谢
答案 0 :(得分:0)
好吧,下次,别忘了在目标目录中添加文件...
所以这是一个用户/主席界面问题。 :-)