| |

Temporarily ignore a file in git

To ignore a file
[cc]
git update-index –assume-unchanged file.to.ignore
[/cc]

To undo
[cc]
git update-index –no-assume-unchanged file.to.ignore
[/cc]
Alternatives: [cci lang]git stash[/cci], [cci lang].gitignore[/cci], but I need to keep the file in the working copy, and not touch the gitignore file since it’s synchronized for all developers

Leave a Reply

Your email address will not be published. Required fields are marked *