Use git-update-index to temporarily ignore changes to files that are already under version control:
git update-index --assume-unchanged <files>
To undo that use:
git update-index --no-assume-unchanged <files>
Also have a look at the skip-worktree
and no-skip-worktree
options for update-index if you need this to persist past a git-reset
Related Contents:
- How can I make Git “forget” about a file that was tracked, but is now in .gitignore?
- Ignore files that have already been committed to a Git repository [duplicate]
- .gitignore exclude folder but include specific subfolder
- Make .gitignore ignore everything except a few files
- How do I configure git to ignore some files locally?
- Can I ‘git commit’ a file and ignore its content changes?
- .gitignore is ignored by Git
- What should be in my .gitignore for an Android Studio project?
- Global Git ignore
- .gitignore for Visual Studio Projects and Solutions
- Gitignore not working
- How to ignore certain files in Git?
- How do I ignore files in a directory in Git?
- How do I tell Git to ignore everything except a subdirectory?
- How to tell git to ignore individual lines, i.e. gitignore for specific lines of code [duplicate]
- How to create a .gitignore file
- Should I check in folder “node_modules” to Git when creating a Node.js app on Heroku?
- Using git, how do I ignore a file in one branch but have it committed in another branch?
- How do I add files without dots in them (all extension-less files) to the gitignore file?
- What are the differences between .gitignore and .gitkeep?
- .gitignore and “The following untracked working tree files would be overwritten by checkout”
- How can I stop .gitignore from appearing in the list of untracked files?
- .gitignore after commit [duplicate]
- git ignore vs. exclude vs. assume-unchanged
- When would you use .git/info/exclude instead of .gitignore to exclude files?
- Whitelisting and subdirectories in Git
- How to remove files that are listed in the .gitignore but still on the repository?
- How do .gitignore exclusion rules actually work?
- What is .gitignore?
- How to exclude file only from root folder in Git
- gitignore all files of extension in directory
- Using .gitignore to ignore everything but specific directories
- git still shows files as modified after adding to .gitignore
- git ignore exception
- How do I make Git forget about a file that was tracked, but is now in .gitignore?
- Remove directory from remote repository after adding them to .gitignore
- How do negated patterns work in .gitignore?
- How to git ignore subfolders / subdirectories?
- Git is ignoring files that aren’t in gitignore
- Why is git is ignoring files that aren’t in the .gitignore file?
- Force add despite the .gitignore file
- gitignore binary files that have no extension
- Apply .gitignore on an existing repository already tracking large number of files
- Git excludesfile for a branch
- What’s the difference between Git ignoring directory and directory/*?
- What to gitignore from the .idea folder?
- Git: How to remove file from index without deleting files from any repository
- Is there a way to tell git to only include certain files instead of ignoring certain files?
- git ignore all files of a certain type, except those in a specific subfolder
- Commit empty folder structure (with git) [duplicate]