如何处理你的分支位于“origin/main”后面9 个提交,并且可以快进。 (使用“git pull”更新本地分支)
我在 Github 上有一个名为 aero 的远程存储库。我的笔记本电脑上有一个名为 aero 的本地存储库。我的台式计算机上还有一个名为 aero 的存储库。我一直在旅行并在笔记本电脑上的本地存储库中进行编辑,当我完成工作时,我成功地将我的工作推送到 Github 上的远程。我想将内容从远程拉到我的桌面上并创建一个新分支来进行其他编辑,但是当尝试 git pull origin 时出现以下错误。
error: The following untracked working tree files would be overwritten by merge:
.DS_Store
.idea/.gitignore
.idea/aero.iml
.idea/inspectionProfiles/Project_Default.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
Please move or remove them before you merge.
Aborting
git status 也有以下消息
Your branch is behind 'origin/main' by 9 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
I have a remote repo on Github called aero. I have a local repo on my laptop called aero. I also have a repo called aero on my desktop computer. I have been travelling and making edits in my local repo on my laptop and when I completed the work, I successfully pushed my work to the remote on Github. I want to pull the contents from the remote onto my desktop and created a new branch to do additional edits, but when trying to git pull origin I get the following error.
error: The following untracked working tree files would be overwritten by merge:
.DS_Store
.idea/.gitignore
.idea/aero.iml
.idea/inspectionProfiles/Project_Default.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
Please move or remove them before you merge.
Aborting
Also git status has the following message
Your branch is behind 'origin/main' by 9 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些说明准确地告诉您该怎么做:
因此,您需要删除这些文件,然后再次尝试 git pull 。
我建议先关闭您的 JetBrains IDE。
The instructions tell you exactly what to do:
So you will need to delete these files then try
git pull
again.I suggest closing your JetBrains IDE first.