Says it commits, but in GitHub it doesn't show up

前端 未结 3 812
忘了有多久
忘了有多久 2021-02-19 20:02

I just installed rails on an Ubuntu machine. I set up git and made an ssh key to link to my account. I made a repository to commit to, and made a sample project to test with cal

3条回答
  •  孤街浪徒
    2021-02-19 20:58

    You have to push your commits from your local repository to the remote repository:

    $ git commit -m "your commit message"
    
    $ git push origin 
    

    Substitute with the remote branch you are pushing to (i.e. master branch would be $ git push origin master).

    Without pushing your commit, you should see a similar message when you run:

    $ git status
    

    Git will tell you that you have commits that you need to push to your remote.

    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
    

    Verify your remote repositories

    If you are seeing an up-to-date status with your remote, you should verify you're actually pushing to the location/repo that you think you are:

    $ git remote -v
    

提交回复
热议问题