1
resposta

não consigo fazer commit no meu gitignore, fica dizendo q não acha o arquivo

eu fiquei horas resolvendo alguns problemas e quando achei q teria um descanso isso ocorreu, honestamente não sei qual o erro:

Wanderson@DESKTOP-M8VRKOJ MINGW64 ~/Desktop/git-e-github (master) $ git add .gitignore fatal: pathspec '.gitignore' did not match any files

Wanderson@DESKTOP-M8VRKOJ MINGW64 ~/Desktop/git-e-github (master) $ git status On branch master Changes to be committed: (use "git restore --staged ..." to unstage) new file: gitignore.exclude new file: gitignore.html new file: untitled.html

Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: gitignore.exclude

Untracked files: (use "git add ..." to include in what will be committed) untitled.txt

Wanderson@DESKTOP-M8VRKOJ MINGW64 ~/Desktop/git-e-github (master) $ git add .gitignore.exclude fatal: pathspec '.gitignore.exclude' did not match any files

Wanderson@DESKTOP-M8VRKOJ MINGW64 ~/Desktop/git-e-github (master)

1 resposta

Oi Eric. Tudo bem?

Pela mensagem que você mandou

Wanderson@DESKTOP-M8VRKOJ MINGW64 ~/Desktop/git-e-github (master) $ git status On branch master Changes to be committed: (use "git restore --staged ..." to unstage) new file: gitignore.exclude new file: gitignore.html new file: untitled.html

Você adicionou dois arquivos, mas nenhum dele foi .gitignore, e repare que ele possui um ponto "." no início do arquivo. Além disso, o arquivo .gitignore não possui nenhuma extensão também.

Espero ter ajudado. Bons estudos!