git - 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 并再次粘贴我的变化是唯一的选择
解决方案
请在进行如下拉取之前进行提交/存储,然后pull
从您的origin
或upstream
分支中获取:
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
推荐阅读
- windows - 如何获取本地驱动器的网络路径
- azure - 具有服务总线主题集成的 Azure Web 作业
- angular - Angular 7:断言将正确数据传递给结构指令的更好方法是什么?
- javascript - 如何在 .html 页面上创建自定义图标而不是默认的 chrome 或资源管理器图标?
- sql - 选择每个组中的最后一条记录(使用内部连接)
- android - 在改造回调实现中出现错误
- xcode-ui-testing - iOS 自动化测试 - XCTest vs Katalon
- matlab - 过滤高于某个阈值的 3D 矩阵?
- azure-application-insights - 我们可以根据请求分离一个应用程序洞察吗?
- laravel-artisan - 在 laravel 4.2 的后台运行函数