【问题标题】:Host: command not found主机:找不到命令
【发布时间】:2015-07-24 09:09:05
【问题描述】:

在这里做 Hartl 的 Rails 书,我应该添加 BitBucket(用于 hello_app)并将其推送到存储库中。然而它只是说整个路径/到/我的/回购丢失(没有像这样的文件或目录)。我可能做错了什么?我已经检查了 ssh,它很合适。

PS 我很欣赏一个通俗易懂的回应,因为我对整个编程都是新手。 :) 提前致谢!

【问题讨论】:

  • 嗨,mars,你能告诉命令你已经尝试运行吗?欢迎加入社区!
  • 在提出任何问题时,请假设没有其他人看过或可以看到您所指的书籍/截屏视频等,并将问题封装在您的问题中。
  • 请发布git status的结果。
  • 嗨 @MaxWilliams 所以在 BitBucket 中创建一个 repo 后,Hartl 的书告诉我运行命令行 > 我有一个现有项目,它是 $ cd /path/to/my/repo $ git remote add origin git@bitbucket.org:mars_/hello_app.git $ git push -u origin --all # 首次推送 repo 及其 refs $ git push -u origin --tags # 推送任何标签 --但是在输入第一行时,终端告诉我没有与之关联的文件或目录..
  • @TheGeorgeous 这是进入 git status 的结果:在分支 master 上没有提交,工作目录干净

标签: ruby-on-rails git repository bitbucket


【解决方案1】:

在命令 $ cd /path/to/my/repo 中,将 /path/to/my/repo 替换为您创建存储库的实际路径。

例如(在 linux 系统和当前用户“mars”上):

$ mkdir /home/mars/hello-app
$ cd /home/mars/hello-app
$ git init
$ git remote add origin git@bitbucket.org:mars_/hello_app.git

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-15
    • 2018-04-28
    • 2017-08-21
    • 2013-07-02
    • 2020-08-26
    • 2021-02-10
    相关资源
    最近更新 更多