add ignored file to git code example
Example 1: git ignore updates to file
git update-index --skip-worktree path/to/file.txt
Example 2: .gitignore
node_modules
.DS_Store
.env
git update-index --skip-worktree path/to/file.txt
node_modules
.DS_Store
.env