[英]When I try to drag and drop a folder which contains a git repository (which is a submodule at the moment) it says “Can't drop folder here…”
In the git-windows-interface when I drag and drop a repository it says: "Can't drop folder, You can only drop one folder without git repository with the app at this time. Dropping a single folder will allow you create a new Git repository in that location...". 在git-windows-interface中,当我拖放存储库时,它说:“无法删除文件夹,此时您只能删除一个没有git存储库的文件夹。删除单个文件夹将允许您创建一个新文件夹那个位置的Git存储库......“。
How should I add a git repository to the git-windows-interface? 我应该如何将git存储库添加到git-windows-interface?
thanks 谢谢
You can try and make GitHub for Windows detect your repo, by modifying the local path(s) it scans. 您可以尝试通过修改扫描的本地路径,使GitHub for Windows检测您的仓库。
That would avoid trying that "drag and drop feature" which might not work in your case (being a submodule, which is by nature a nested git repo). 这样可以避免尝试那种在您的情况下可能无效的“拖放功能”(作为子模块,本质上是一个嵌套的 git repo)。
If it isn't possible to change that path, at least try and copy that repo in %HOME%\\My Documents
(HOME being set by the portable git within GitHub for Windows, C:\\User\\login
on W7+, C:\\Document and Settings\\Login
on WXp). 如果无法更改该路径,请至少在%HOME%\\My Documents
复制该repo(HOME由GitHub for Windows中的便携式git设置, C:\\User\\login
on W7 +, C:\\Document and Settings\\Login
WXp)。
Then a local scan will detect it. 然后本地扫描将检测到它。
I was getting the same error. 我得到了同样的错误。 I had been trying to drag in the hidden .Git folder. 我一直试图拖动隐藏的.Git文件夹。 Instead, drag in the folder above, which contains the .Git folder. 而是拖动上面的文件夹,其中包含.Git文件夹。
This worked for me: 这对我有用:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.