Git: how to determine if a file or folder is committed versus ignored?
In Git, how to determine if a file or folder is committed versus ignored?
That is, I have a folder in the current directory and I don't know if it was executed, or if there is a .gitignore in there, where the folder is ignored. When I do "git status" the folder is not listed in any sections.
Second, if a folder has been committed, is there an easy way to determine which of its files have been committed? For example:
folder contains:
- 0001.csv
- 0002.csv
- ...
- 2000.csv
And I want to indicate which files were transferred and which were ignored.
source to share
You are looking for
git status --ignored
?
This will show a result that looks like this:
No changes are made to commit:
(use "git add ..." to update what will be committed)
(use "git checkout -..." to revert changes in the working directory)(all added / changed)
Files to ignore:
(use "git add -f ..." to include in whatever gets executed)(all ignored files)