What if .git/info/exclude doesn't work

Git is very useful if you work in a team or you want to keep your project versioned. Sometimes though you want to ignore specific files which are specific to your repository and you don't want to share this setting with other repositories.

To do it you can simply put the path to ignore in the .git/info/exclude file.

Today I did it for a new project but git kept tracking the path I needed to ignore. Luckily there is a simple command that allows you to tell git to assume that a file is always unchanged. To do it just write it in your terminal:

git update-index --assume-unchanged path/to/exclude

To revert this settings just write:

git update-index --no-assume-unchanged path/to/exclude

I hope this tip will be useful for you. If you have something to say about it just leave a comment below.

Read more

Portfolio | The projects I've worked on

Blog | What I've to say

I've been in Iceland for a project about 2 years ago. I've been there for just 4 days and I didn't get the chance to explore the island. Since then, Iceland has been on my list. I had to go back and...
I'm glad to announce that one of my pictures has been shortlisted for the final of the Siena International Photography Awards! Siena International Photo Award is one of the photo contests with the...
I’m proud to announce that one of my pictures will be on exhibit at the #IgersDublinBridges Gallery Night. Unfortunately I can’t say which picture made to the final of the competition but you can...