我有一个管道设置,具有自动处理/构建CSS文件的功能。有时候git ftp push
时出现此错误:
致命:脏存储库:尚未提交的更改。正在退出...
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文件,因为无论如何在构建过程中都会生成该文件。我该如何解决?
我认为为时已晚,但今天我遇到了同样的问题。经过一些研究,我从存储库中删除了package-lock.json
和yarn.lock
文件,问题消失了。希望能有所帮助!