我在服务器上有两个分支名为R2的分支和一个名为DEV I的分支无意中登录到错误的服务器,进入存储库并执行了GIT PULL ORIGIN DEV但是存储库位于R2上.所以我意识到我的错误然后试图通过做一个GIT PULL ORIGIN R2来纠正我的错误但是我最终得到了一堆文件名和错误
U view/private_api/ipn.phtml
M view/reports/menScholarshipForm.pdf
M view/reports/printProCard.phtml
M view/reports/printSanction.phtml
M view/sanctionDetailRoster.html
M view/sanctionDetailVerify.html
M view/verifyMembership.phtml
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
Run Code Online (Sandbox Code Playgroud)
我不介意进入并手动重置每个文件,只是不确定如何解决我的错误.谢谢
git pull只是git fetch后面的简写git merge FETCH_HEAD.看起来你在git merge舞台上遇到了一些冲突.
git merge --abort 将中止合并过程并尝试重建合并前状态.
要重置 R2为以下内容origin/R2:
git checkout R2
git fetch origin
git stash # because it's always a good thing to do
git reset --hard origin/R2
Run Code Online (Sandbox Code Playgroud)