如何将项目推送到我的 GitHub 存储库中的特定文件夹中?
How can I push project in specific folder in my GitHub repository?
我在 GitHub 中创建了一个名为 "EpamCourses2015" 的新存储库。接下来,我在其中创建了名为 "homeworks" 的文件夹。只有一个 URI "https://github.com/username/EpamCourses2015.git"
,所以在我的 Eclipse EGit 插件中我自己添加了 "homeworks",比如 "https://github.com/username/EpamCourses2015.git/homeworks"
但是当我添加 ref 映射时它给了我一个错误:
Transport Error: Cannot get remote repository refs.
https://github.com/username/EpamCourses2015.git/homeworks:
https://github.com/username/EpamCourses2015.git/homeworks/info/refs?service=git-upload-pack
not found
任何人都可以告诉我,如何将我的项目推送到我的 GitHub 存储库中的单独文件夹中?
Github 并不是真正设计用于那样使用的,您只能将父存储库克隆并推送到 Github 并且不正确支持子存储库。
您应该克隆您的 EpamCourses2015 存储库,将您的作业文件夹添加到其中,提交它,然后将其推送到 Github
如果您希望在 Eclipse 中执行此操作,请克隆 EpamCourses2015 存储库并在该文件夹中创建您的家庭作业项目,Eclipse 应该会自动检测父存储库并允许您添加它
我在 GitHub 中创建了一个名为 "EpamCourses2015" 的新存储库。接下来,我在其中创建了名为 "homeworks" 的文件夹。只有一个 URI "https://github.com/username/EpamCourses2015.git"
,所以在我的 Eclipse EGit 插件中我自己添加了 "homeworks",比如 "https://github.com/username/EpamCourses2015.git/homeworks"
但是当我添加 ref 映射时它给了我一个错误:
Transport Error: Cannot get remote repository refs. https://github.com/username/EpamCourses2015.git/homeworks: https://github.com/username/EpamCourses2015.git/homeworks/info/refs?service=git-upload-pack not found
任何人都可以告诉我,如何将我的项目推送到我的 GitHub 存储库中的单独文件夹中?
Github 并不是真正设计用于那样使用的,您只能将父存储库克隆并推送到 Github 并且不正确支持子存储库。
您应该克隆您的 EpamCourses2015 存储库,将您的作业文件夹添加到其中,提交它,然后将其推送到 Github
如果您希望在 Eclipse 中执行此操作,请克隆 EpamCourses2015 存储库并在该文件夹中创建您的家庭作业项目,Eclipse 应该会自动检测父存储库并允许您添加它