我有本地工作副本SourceTree。和所有的操作工作得很好,我可以简单的获取,推,拉等通过SourceTree。我只需要在SourceTree中不存在的force push。

我打开终端使git按-f

remote: Repository not found.
fatal: repository 'https://github.com/MyRepo/project.git/' not found

我不确定会有什么问题。


当前回答

请在下面找到Windows的工作解决方案:

从“开始”菜单打开“控制面板”。 选择用户帐户。 选择“凭据管理器”。 点击“管理Windows凭证”。 删除所有与Git或GitHub相关的凭证。 一旦你删除了所有,然后尝试再次克隆。

其他回答

因为您可能没有首先将远程git存储库标识到您的终端。

git remote set-url origin https://github.com/MyRepo/project.git

然后,

git add .
git commit -m "initial commit"
git push origin master

您可以尝试删除目录中的.git文件,并重新执行所有操作将解决您的问题!

试试这个,对我很管用。

git remote rm origin
git remote add origin https://github.com/your-username/{{project-name}}.git

在Visual Studio中从Github克隆时,点击Github链接上的“浏览存储库”选项,它将要求登录。

执行git远程更新对我来说很有效。