【发布时间】:2021-06-24 04:10:58
【问题描述】:
在一些帮助下,我设法从 fatal: not a git repository (or any of the parent directories): .git 问题中恢复了本地 git 项目...Why does git not recognise my local repository?
但是现在我的本地 git 在一个新的本地分支上(在 GitHub 远程上不存在)并且与现有的远程源断开连接。
-
git remote -v不返回任何内容
如何重新连接本地 git 并将其推送到现有的 GitHub 远程,而不会丢失新的本地分支及其提交?
【问题讨论】:
-
is disconnected from the existing remote origin你能澄清一下这是什么意思吗,例如通过在您尝试git checkout my-branch; git push时将命令和输出添加到问题中? -
已添加
git remote -v感谢@AD7six,我会努力养成这样的习惯。
标签: git github git-remote