如何删除git子模块残骸?

去啊

在将我的代码历史记录推送到git存储库时,我发现Objective-C项目作为子模块工作,这意味着如果我推送Objective-C项目,它将像这样子模块工作

注意到该因素后,我尝试重新初始化.git文件夹。(删除并尝试调用“ git init”)

但是它根本无法工作,并且子模块仍然有效。

我也尝试了git submodule deinitinit命令。但是,此后,即使我尝试将文件推送到git存储库,它也会抛出此消息。

Sogos-Macbook:Test code dkswogus7530$ git push -u origin master

To https://github.com/JaehyunAhn/cpuls2_book_review.git
! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/JaehyunAhn/cpuls2_book_review.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

我还尝试更新并删除我的git存储库,以键入命令git pull origin master,并且该命令中止此消息

Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 537 bytes | 0 bytes/s, done.
Total 5 (delta 2), reused 0 (delta 0)
remote: error: object d5c202897cf6f769235a2707d15719636fe37984:contains duplicate file entries
remote: fatal: Error in object
error: unpack failed: index-pack abnormal exit
To https://github.com/JaehyunAhn/cpuls2_book_review.git
 ! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'https://github.com/JaehyunAhn/cpuls2_book_review.git'

我该如何解决这个问题?

子模块库从指着这个这个这个

古尔丁山

如果所有其他方法都失败了,而您真的只想重新启动,为什么不将cd放入存储库和每个子模块,然后执行以下操作:

rm -rd .git

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章