dongzhong1891 2015-08-09 19:08
浏览 136
已采纳

如何将文件夹从public_html添加到GitHub存储库?

I made a GitHub repository for my PHP project. All files are located in /home/nikola/public_html/todo/. However, I don't know how to add it. First time I made it by typing this:

git add ~/public_html/todo

This time, it just doesn't work. When I try to do: git add ~/public_html/todo and type git status it says that one file is not yet commited (todo) but that's directory with files and directories in it! I can't find solution. I have cloned repository normal in /home/nikola/todo and tried to do this.

  • 写回答

3条回答 默认 最新

  • donglue8180 2015-08-09 19:26
    关注

    You seem to have something wrong with your github repository layout. The files that you want to add to your repository must be within the repository source tree.

    The way I understand it, your git repo is in ~/todo and you want to add files from ~/public_html/todo, but this is not how git works. Copy your files into ~/todo (cp -r ~/public_html/todo/* ~/todo/) and try again.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题