Skip to content

Instantly share code, notes, and snippets.

@afsardo
Last active July 2, 2017 15:37
Show Gist options
  • Save afsardo/585caabc6aa3ba3a36dc3a4bad5b9afa to your computer and use it in GitHub Desktop.
Save afsardo/585caabc6aa3ba3a36dc3a4bad5b9afa to your computer and use it in GitHub Desktop.
Don't Track CHMOD in Git

In my case when I develop an application I use homestead, so I never have to bother about file permissions, then in production (e.g. AWS) I clone my project and I do have to setup them up.

What happens is this:

        modified:   bootstrap/cache/.gitignore
	modified:   storage/app/.gitignore
	modified:   storage/app/public/.gitignore
	modified:   storage/framework/.gitignore
	modified:   storage/framework/cache/.gitignore
	modified:   storage/framework/sessions/.gitignore
	modified:   storage/framework/testing/.gitignore
	modified:   storage/framework/views/.gitignore
	modified:   storage/logs/.gitignore

So if you don't want git to track the diff in your file permissions use this command:

$ git config core.filemode false

I do not know if this is a good practice, but it was the way that I found to not have that messy git status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment