title: git ignore .env files not working
body: <p>I have a laravel project. In the root directory are these 4 files:</p>
  
  <blockquote>
    <p>.env .env.example .env.local .env.staging</p>
  </blockquote>
  
  <p>I have a .gitignore file, and I'm listing these 4 files in the .gitignore, one after another, like this</p>
  
  <pre><code>.env
  .env.example
  .env.local
  .env.staging
  </code></pre>
  
  <p>My git repository does not contain .env or .env.example, but it DOES contain .env.local and .env.staging. 
  I've tried everything I can think of, but it keeps syncing these 2 files with Gitlab.</p>
  
  <p>Any ideas what could be causing this?</p>
  
  <p>Thanks for your help!</p>