Skipping locally updated files with Git

If you have a local file that you’ve updated locally (like a properties file) but you want to avoid committing the changes when you next commit, use this command:

git update-index --skip-worktree path/to/filename

If you need to add it back to the list of tracked files, then use this:

git update-index –no-skip-worktree path/to/filename

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.