我有一个通过复制特定文件夹的内容而创建的GitHub存储库。
现在,我已经安装了GitHub Desktop,我想将此目录直接连接到GitHub存储库,而不是重新下载并创建副本。
我该怎么做?
我有一个通过复制特定文件夹的内容而创建的GitHub存储库。
现在,我已经安装了GitHub Desktop,我想将此目录直接连接到GitHub存储库,而不是重新下载并创建副本。
我该怎么做?
在切换到GitHub桌面之前,您应该为该文件夹准备环境,以便链接到远程存储库:
cd /local/path/to/folder
git init .
git remote add origin https://github.com/<me>/<myRepo>
git fetch
git switch -m master
然后,您可以打开GitHub Desktop和add a local repository(您刚刚配置的文件夹)