首页 > 解决方案 > git pull 总是显示这个消息

问题描述

我进行了 git pull 并收到此消息您对以下文件的本地更改将被合并覆盖:

   1. etomsef/ui/portal/build/webpack.config.js  
   2.  etomsef/ui/portal/schema/msgs.properties
   3. etomsef/ui/portal/schema/schema.js

Please commit your changes or stash them before you merge.

我第一次使用 git,我感到非常困惑,不仅仅是编码部分,它的 git 需要时间,我的文件夹经常被损坏,我必须再次克隆所有内容。

以上是我不时收到的带有不同文件的味精,我应该运行什么命令以避免混淆和返工。我会扭转这个文件的变化,采取备份并采取 git pull 并再次粘贴我的变化是唯一的选择

标签: git

解决方案


请在进行如下拉取之前进行提交/存储,然后pull从您的originupstream分支中获取:

git add .
git commit -m "commit message"
git pull origin/upstream branch_name

或者

git stash push -m "message"
git pull origin/upstream branch_name
git stash pop

推荐阅读