Gitignore - How to ignore certain files in git

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I have a repository with a file Hello.java. When I compile it an additional Hello.class file is generated.

I created an entry for Hello.class in a .gitignore file. However the file still appears to be tracked.

I want to know how to make git ignore Hello.class.

Answers

The problem is that .gitignore ignores just files that weren t tracked before (by git add). Run git reset name_of_file to unstage the file and keep it. In case you want to also remove given file from the repository (after pushing), use git rm --cached name_of_file.

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/4308610/how-to-ignore-certain-files-in-git

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils