致命:肮脏的存储库:尚未提交的更改.使用git ftp push在管道中退出... [英] Getting fatal: Dirty repository: Having uncommitted changes. Exiting... in Pipelines with git ftp push
问题描述
我有一个管道设置,可以自动处理/构建CSS文件.有时候在执行 git ftp push
时会出现此错误:
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
输出 git status -uno --porcelain
git status -uno --porcelain
M style.css
过去,我提交了style.css(现在会自动生成的内容)-但现在希望它忽略我的本地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?
推荐答案
我认为为时已晚,但是今天我遇到了同样的问题.经过一番研究后,我从存储库中删除了 yarn.lock
文件,问题消失了.希望有帮助!
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!
这篇关于致命:肮脏的存储库:尚未提交的更改.使用git ftp push在管道中退出...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!