[英]Getting fatal: Dirty repository: Having uncommitted changes. Exiting… in Pipelines with git ftp push
I have a Pipelines setup with automatic processing/building of CSS files.我有一个管道设置,可以自动处理/构建 CSS 文件。 Some of the time I get this error when doing git ftp push
:有时我在执行git ftp push
时收到此错误:
fatal: Dirty repository: Having uncommitted changes.致命:肮脏的存储库:有未提交的更改。 Exiting...退出...
bitbucket-pipelines.yml 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
Output 来自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.在过去,我已经提交了 style.css (现在自动构建的内容) - 但现在希望它忽略我的本地 style.css 文件,因为无论如何它都是在构建过程中生成的。 How can I fix this?我怎样才能解决这个问题?
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.经过一番研究,我从 repo 中删除yarn.lock
文件,问题就消失了。 Hope that helps!希望有帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.