我已经将计算机恢复出厂设置,在此之前,我已将github存储库本地同步到远程。现在,我试图添加一个本地存储库,它一直显示:此目录似乎不是git存储库。所有存储库都执行此操作。我将.gitattributes文件粘贴到了github文件中,并创建了一个新的本地存储库。
其他大多数帖子都使用git bash / terminal / command提示符。我使用GitHub桌面,所以我需要一个使用GitHub桌面的解决方案。任何帮助将不胜感激,因为我将所有文件存储在这些存储库中-github是我的备份。
Here is what it looks like after I created a new repository for one of the repositories online that I had, and tried linking them with the URL:
It did not show the URL option. Publishing obviously doesn't work because it already exists on GitHub.
Instead of adding an existing folder, you should clone your repo to a new one, and start working from said new clone.
See GitHub Desktop cloning a repository.
But if you want to use your existing folder as a local repo of an existing remote repo, follow desktop/desktop issue 2883
- Drag an ordinary folder into the app (or use Add Local Repository and choose the folder)
- 您将收到一条消息,指出“此目录似乎不是Git存储库。您想在这里创建存储库吗?” 并且“添加存储库”文件夹被禁用
- 点击“在此处创建存储库”
- 选择“存储库->存储库设置...->远程”选项。输入您的远程仓库的URL。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句