When I do
git status
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: src/app.js
modified: src/view/view.js
modified: src/view/layout.js
modified: src/view/layout2.js
modified: src/view/layout3.js
modified: src/view/layout4.js
modified: src/view/layout5.js
Untracked files:
(use "git add <file>..." to include in what will be committed)
../hidemeplease.json
git add -A
git status
git status
git update-index --assume-unchanged hidemeplease.json
An untracked file, in Git, is a file whose path name does not appear in the index.
Since it's not in the index, you cannot tell git update-index
to mark the index entry as "assume unchanged" or "skip worktree". But this is actually good news.
If a file is not in the index, git status
will normally complain about it, and git add .
would add it. To prevent these from occurring, list the file's path name in a .gitignore
file.
The .gitignore
file contains a list of path names that Git will shut up about, and not auto-add. So it should really be called .git-shut-up-about-these-files-and-do-not-auto-add-them
. That name is kind of unweildy, though, hence .gitignore
.
Note that if a file's path name is in the index, listing that file in a .gitignore
file has no effect at all. That's why the current complaint is good news.