问题
I have a Pipelines setup with automatic processing/building of CSS files. Some of the time I get this error when doing git ftp push
:
fatal: Dirty repository: Having uncommitted changes. Exiting...
bitbucket-pipelines.yml
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
Output from git status -uno --porcelain
git status -uno --porcelain
M style.css
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?
回答1:
I think it's too late but today I faced the same problem. After some research I deleted yarn.lock
file from the repo and the problem disappear. Hope that helps!
来源:https://stackoverflow.com/questions/58565212/getting-fatal-dirty-repository-having-uncommitted-changes-exiting-in-pipel