Quando adiciono o nome do arquivo no arquivo .gitignore ele contuna listando os arquivos
Dell@Dell-PC MINGW64 ~ (master)
$ cd Documents/git
Dell@Dell-PC MINGW64 ~/Documents/git (master)
$ git init
Reinitialized existing Git repository in C:/Users/Dell/Documents/git/.git/
Dell@Dell-PC MINGW64 ~/Documents/git (master)
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
git.html
nothing added to commit but untracked files present (use "git add" to track)
Dell@Dell-PC MINGW64 ~/Documents/git (master)
$ git add index.html
Dell@Dell-PC MINGW64 ~/Documents/git (master)
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
git.html
nothing added to commit but untracked files present (use "git add" to track)
Dell@Dell-PC MINGW64 ~/Documents/git (master)
$ git add .gitignore
fatal: pathspec '.gitignore' did not match any files
Dell@Dell-PC MINGW64 ~/Documents/git (master)
$ git commit -m "Adicionado .gitignore"
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
git.html
nothing added to commit but untracked files present (use "git add" to track)
Dell@Dell-PC MINGW64 ~/Documents/git (master)
$