Git Quickie: Skip Tracking
Remove specific change from git tracking

Software Engineer with passion in frontend who specializes in Angular but doesn't hesitate to check on other sides - configuring CI/CD, clouds, backend and API, mobile development using Flutter, and so on.
Many credentials are accidentally committed to different git repositories (GitHub, GitLab, etc.), which reduces app security as anyone can scan public repo for some common files/variables with credentials.
To avoid this, we usually use .gitignore but sometimes there could be corner cases. For example, we've got the .npmrc file with the predefined field for using of token to access private registries. And file with that placeholder is committed to source control.
So what can we do to not commit private tokens accidentally? There is another one-line command for this:
git update-index --skip-worktree .npmrc
What are your favorite git commands? Please, don't hesitate to share them in the comments section!

