I used command git status but it not showing or listing ignored files.
I want to see list of files which are under .gitignore using git command.
what command should I use
Yes. It’s working.
Also suppose I want to remove file from .gitignore what command should I use
If you want to remove the file from the repo, you can use git rm --cached <file name>
. Here --cached
will keep files on your filesystem.
Refer this: git - How to remove files that are listed in the .gitignore but still on the repository? - Stack Overflow
No, my question was suppose I added file in .gitignore using
echo test.txt >> .gitignore
but now I want to get that file out from .gitignore in working directory.
they which command should I use
Try git clean -X <filename>
Also check out man git clean
or git clean --help
for options it takes.