【问题标题】:Git folder and github repository connection issueGit文件夹和github存储库连接问题
【发布时间】:2021-03-11 11:47:43
【问题描述】:

我的计算机中有一个与 github 存储库链接的 git 文件夹。每当我在那个文件夹中做一些工作时,我都会将它推送到我的 github 存储库中。现在,我不小心删除了我的 git 文件夹。如何将我的工作推送到 github 存储库?

【问题讨论】:

    标签: git github repository


    【解决方案1】:

    如果我理解正确,您需要先将 github 存储库拉到您的本地计算机,然后您可以照常继续。根据您的项目,可能会涉及额外的步骤,如果您有一些未与 github 同步的依赖项,则需要安装它们。

    git clone https://github.com/user/repo-name
    

    此命令将创建文件夹 repo-name 并将您保存的 repo 从 github 复制到本地计算机。

    【讨论】:

    • 使用 git clone 命令后,我可以提交并将我的工作推送到 GitHub 存储库吗?如果是,那么如何?
    • 如果你想处理那个 repo,更好的选择是 fork。
    猜你喜欢
    • 2021-11-19
    • 1970-01-01
    • 2016-06-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-06
    • 1970-01-01
    • 2015-08-22
    相关资源
    最近更新 更多