title: Getting fatal: Dirty repository: Having uncommitted changes. Exiting... in Pipelines with git ftp push
body: <p>I have a Pipelines setup with automatic processing/building of CSS files. Some of the time I get this error when doing <code>git ftp push</code>:</p>
  
  <blockquote>
    <p>fatal: Dirty repository: Having uncommitted changes. Exiting...</p>
  </blockquote>
  
  <p><strong>bitbucket-pipelines.yml</strong></p>
  
  <pre><code>image: php:7.2.7
  
  pipelines:
   branches:
     staging:
       - step:
           name: Deploy to staging
           deployment: staging
           script:
             - curl -sL https://deb.nodesource.com/setup_8.x | bash -
             - apt-get install -y nodejs
             - npm install
             - npm run build-css
             - apt-get update
             - apt-get -qq install git-ftp
             - git status -uno --porcelain
             - git ftp push --user $FTP_username --passwd $FTP_password ftp://ftp.website.com
  </code></pre>
  
  <p><strong>Output from</strong> <code>git status -uno --porcelain</code></p>
  
  <pre><code>git status -uno --porcelain
   M style.css
  </code></pre>
  
  <p>In the past I have committed style.css (what is now getting built automatically)-- but now want it to ignore my local style.css file as it is getting generated during the build anyways. How can I fix this?</p>