git - 由于 .gitignore 未跟踪,无法 git pull
问题描述
执行后:
git pull origin master
我得到以下信息:
* branch master -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
.gitignore
Please move or remove them before you merge.
Aborting
我该如何继续?
解决方案
输出告诉您有未提交的更改。
您可以执行以下操作之一:
对于add & commit
您的更改:
# Add and commit changes
git add . && git commit -m"Message"
要放弃更改:
# discard your changes
git checkout -- .gitignore
推荐阅读
- javascript - 在传递给新的新可观察对象之前等待异步调用完成
- r - 在R中合并具有不同列的两个数据框
- angular-universal - 使用 Angular 的 Renderer2,在使用 selectRootElement 方法时使用来自@ViewChildren 的 elementRef 是否安全(并且是公认的做法)?
- java - 在带有 PJSIP Android 库的 Android 6.0 上的 pjsip 中使用无用户帐户时出现问题
- optaplanner - OptaPlanner,强制PlanningVariable按范围顺序填充
- reactjs - Material UI 拖放不会为跳过的索引创建占位符。如何创建我自己的索引并将其与我的列表索引一起传递给可拖动的结果
- oracle - oracle - 如何使用 dd-MMM-yy 格式的日期排序
- android - 如何使用 Codeceptjs 在 React Native(仅限 Android)中选择列表中的特定元素进行测试?
- python - 我不能在 vscode 中同时使用 Python 和 C 或 C++ 吗?
- amazon-web-services - AWS:密码不可用