0
我已经分叉并克隆了一个存储库,以便为它做出贡献。在命令行中,我创建了一个新分支,并创建了一个名为'ansible.cfg'的文件,但在运行git status
时不会显示。玩弄甚至一个文件“a.cfg”后不git的状态显示:新文件没有在git状态下显示
$ git status
On branch add-selenium-grid
nothing to commit, working directory clean
$ touch tests/ui/a.txt tests/ui/a.cfg
$ git status
On branch add-selenium-grid
Untracked files:
(use "git add <file>..." to include in what will be committed)
tests/ui/a.txt
nothing added to commit but untracked files present (use "git add" to track)
$ ls tests/ui/a.*
tests/ui/a.cfg tests/ui/a.txt
我很新与git,但这似乎如此基本,我不知所措。
检查的.gitignore文件,看看是否有与* .CFG – buff
有一条线在.gitignore中没有* .cfg。另外,我只是尝试了'touch a.cfg',它显示在git状态中,但是'tests/ui/a.cfg'不会显示在状态中。 – je1910
尝试使用'git check-ignore -v tests/ui/a.cfg'来查看是什么使得它关闭了'a.cfg'(如果你的Git不是太老的话不能有'check-ignore -v')。 – torek