gpt4 book ai didi

git - 如何切换 Azure Web App 的持续部署存储库?

转载 作者:行者123 更新时间:2023-12-03 01:52:13 25 4
gpt4 key购买 nike

我使用 Azure Web 应用程序的本地 git 存储库设置了持续部署,并向其推送了多个更新。我断开了与存储库的连接,以便我可以按照documentation设置一个新的存储库。 。当我使用本地 git 存储库设置新的持续部署时,我的原始存储库仍然存在,其中包含我推送的所有更新,当我尝试从新源推送到它时,git 告诉我不能,因为版本不是正确 merge :

error: failed to push some refs to < my url > hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

我还尝试使用以下方法远程删除存储库:

git push azure :master

但被拒绝:

remote: error: By default, deleting the current branch is denied, because the next 'git clone' won't result in any file checked out, causing confusion. You can set 'receive.denyDeleteCurrent' configuration variable to 'warn' or 'ignore' in the remote repository to allow deleting the current branch, with or without a warning message. To squelch this message, you can set it to 'refuse'. refusing to delete the current branch: refs/heads/master To < my-url > ! [remote rejected] master (deletion of the current branch prohibited) error: failed to push some refs to '< my-url >'

是否与源断开连接,就像我不应该删除存储库以便可以添加新存储库一样?当我在断开站点连接之前或之后进入 Kudu 时,存储库仍然存在。

我对 Kudu 还不太熟悉,但尝试使用浏览器 UI 功能删除 .git 目录,看看会发生什么,但它没有被删除。我尝试在导航到存储库目录后在控制台中运行 git status ,但它告诉我:

fatal: Not a git repository (or any of the parent directories): .git

如果断开连接不起作用,我不知道该怎么办,它不允许我远程删除它,并且似乎无法使用 Kudu 进行任何控制。

最佳答案

您可以在 Kudu 中使用命令行删除 .git:

rm -rf site/repository/.git

关于git - 如何切换 Azure Web App 的持续部署存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34586135/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com