.gitignore for multi projects - Visual Studio

3

Scenario

I have a versioned project in github, I mounted a .gitignore file to make the project lighter and not unnecessarily versioning files, but I'm not having success. Note that my .gitignore file is at the root of the project.

Doubt

All the files I put in .gitignore continue to version. How do I resolve?

Project Structure

. \ 70-483
| -----. git
| ----- \ ManageProgramFlow
| ------ |

asked by anonymous 17.04.2018 / 15:44

1 answer

1

You can remove the cache from the files and so gitignore will start ignoring files that have already been com . >

As a basis, I'll use this test project:

Todothissimplyexecutethecommandbelow:

git rm -r --cached . └┬┘ └┬┘ └───┬───┘ └┬┘ │ │ │ └─── Pasta ou arquivo que você deseja remover o cache │ │ └───────────── Desassociar e remover caminhos apenas do índice. │ └──────────────────── Recursividade (em caso de pasta) └──────────────────────── Remove arquivos da árvore de trabalho e do índice

Once this is done, we will have the result below if we execute git status

Nowweneedtocommitchanges:

gitcommit-m"Atualiza cache do gitignore"

And now we will have the files that were not ignored, such as untracked files .

    
18.04.2018 / 05:32