Cocoapods/git 'detached HEAD' state

我与影子孤独终老i 提交于 2021-01-28 11:13:58

问题


have an issue with cocoapods/git. I'm trying to add new pod to the project and get the following issue. The point is a team member didnt get the issue when he tried to add the Pod to the project. Tried to reinstall/update cocoapods, git, delete and re-clone a repo. I've installed previous SDK version and everything fine, but the latest is failed

Installing RescueSDK 4.0.1

[!] Error installing RescueSDK
[!] /usr/local/bin/git clone https://github.com/LogmeinRescue/iOS-SDK.git /var/folders/sp/59sclxxd21590rgz5bvwf8zw0000gn/T/d20190313-28582-12gul24 --template= --single-branch --depth 1 --branch 4.0.1

Cloning into '/var/folders/sp/59sclxxd21590rgz5bvwf8zw0000gn/T/d20190313-28582-12gul24'...
Note: checking out '913aeaa7da9a1b2140525154bfc2beefde5f4214'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

git-lfs filter-process: git-lfs: command not found
fatal: the remote end hung up unexpectedly
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

回答1:


The problem has been solved with following steps:

  • uninstall git
  • remove git config file
  • install git
  • ....
  • Profit


来源:https://stackoverflow.com/questions/55139581/cocoapods-git-detached-head-state

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!