简体   繁体   English

每次我尝试部署稳定分支时,我都会收到此错误

[英]Everytime I try to deploy stable branch I get this error

 npm ERR! code 1
   npm ERR! Command failed: /usr/bin/git checkout 95b2dd3fe63ec9b6c7cec4f63f8276f4d907f228
   npm ERR! error: Your local changes to the following files would be overwritten by checkout:
   npm ERR!     test/blobReach.png
   npm ERR! Please, commit your changes or stash them before you can switch branches.
   npm ERR! Aborting
   npm ERR! 

I dunno why this is happening, more details can be provided about the issue if and when asked我不知道为什么会发生这种情况,如果询问,可以提供有关该问题的更多详细信息

You've made uncommitted changes to the file test/blobReach.png .您对文件test/blobReach.png进行了未提交的更改。 You need to either remove those changes or commit them before git will allow you to do any sort of checkout.您需要在 git 允许您进行任何类型的结帐之前删除这些更改或提交它们。

If you run git status it will show you all changed files, which right now should show test/blobReach.png .如果您运行git status它将显示所有更改的文件,现在应该显示test/blobReach.png If you have important changes in that file then add and commit them before doing a checkout.如果您在该文件中有重要更改,请在签出之前添加并提交它们。 Another option is to "stash" those changes, which hides them while allowing you to "unstash" them at a later time.另一种选择是“隐藏”这些更改,这会隐藏它们,同时允许您稍后“取消隐藏”它们。 Running git stash will take care of that for you.运行git stash会为你解决这个问题。 If you want to undo all of your changes to test/blobReach.png , there are a few ways to do that, all of which are described here .如果您想撤消对test/blobReach.png所有更改,有几种方法可以做到,所有这些都在此处进行了描述。

Whichever option you choose, you have to do one of them before git will allow you to checkout any other branches.无论您选择哪个选项,您都必须在 git 允许您签出任何其他分支之前执行其中一个选项。 This is git's way of making sure you don't accidentally overwrite an important file.这是 git 确保您不会意外覆盖重要文件的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 每次我尝试部署函数时,我都会收到“找不到类型定义文件...” - Everytime I try to deploy functions I get "Cannot find type definition file for ..." 每次运行 npm install 时,都会收到无关的警告/错误 - Everytime I run npm install, I get the extraneous warning/error 当我尝试部署 firebase function (基本你好世界)时,我收到此错误:FetchError:无法获取本地颁发者证书 - When I try to deploy firebase function (basic hello world), i get this error :FetchError: unable to get local issuer certificate 每次我在 ask-cli v2 中部署我的技能时都会抛出错误 - Error keeps throwing everytime i deploy my skill in ask-cli v2 当我尝试连接到 mongodb 时出现此错误 - when i try to connect to mongodb get this error 每次我尝试运行 NPM 安装终端都会抛出几个错误 - Everytime I Try To Run NPM Install Terminal throws several errors 每次运行cluster.fork()时,都会出现错误:绑定EADDRINUSE - Everytime I run cluster.fork(), I get a Error: bind EADDRINUSE 尝试保存猫鼬时出现错误? - I get error when I try to save in mongoose? 当我尝试连接到 mongodb 时出现此错误 - I get this error when i try to connect to mongodb 当我尝试创建 react 项目时出现错误 - When i try to create react project i get error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM