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

One of my pictures has been featured in the National Geographic Daily Dozen of today January 2nd 2017. To get a picture selected by National Geographic is such an honor for every photographer and if...
I don't really like presets. I always edit my pictures starting from the basic panel; then I add some brushes to dodge and burn or to do some local changes. Then Sleeklens contacted me to let me try...
From Friday the 8th of July until Thursday the 21st of July Obscure Street will showcase the work of about 60 street photographers from all around the world. The exhibition will be part of the...