说它提交,但在GitHub它没有出现

Jon*_*sco 12 git github

我刚刚在Ubuntu机器上安装了rails.我设置了git并制作了一个ssh密钥来链接到我的帐户.我创建了一个存储库来提交,并使用名为first_app的测试项目进行测试.当我提交时,它表示它已全部提交,但我去了github并且它不在那里.我想把我的项目放在那里,但由于某种原因它没有连接.我已经google了,我没有看到任何东西,所以它一定是我做的一些愚蠢的事情.有没有办法可以检查一切配置是否正确?

编辑:尝试设置远程地址,但它已经是正确的.它具有正确的URL.

Edit2:这是终端中出现的内容:

jonny@MM061-JD:~/first_app$ cat .git/config
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = git@github.com:JonnyDoeInWisco/first_app.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
jonny@MM061-JD:~/first_app$ git remote -v
origin  git@github.com:JonnyDoeInWisco/first_app.git (fetch)
origin  git@github.com:JonnyDoeInWisco/first_app.git (push)
Run Code Online (Sandbox Code Playgroud)

Tho*_*ger 9

您必须将提交从本地存储库推送到远程存储库:

$ git commit -m "your commit message"

$ git push origin <branch_name>
Run Code Online (Sandbox Code Playgroud)

替换<branch_name>你正在推动的远程分支(即master分支$ git push origin master).

随着推你的承诺,你将看到类似的消息,当您运行:

$ git status
Run Code Online (Sandbox Code Playgroud)

Git会告诉你,你需要提交push你的遥控器.

On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)
nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)

验证您的远程存储库

如果您看到遥控器的最新状态,您应该确认您实际上是在推送到您认为自己的位置/仓库:

$ git remote -v
Run Code Online (Sandbox Code Playgroud)

  • 我这样做了,它说一切都是最新的。但是github上什么都没有。 (2认同)