Trouble with first commit to git repository

I’m new to Git, and have set it up and created my first repository. I’m trying to add a README as the first commit, and I’ve been following the steps on exactly, but I get stuck on this step:

git push -u origin master

I get this error:

  • How to make a git rebase and keep the commit timestamp?
  • Github commit, diff does not show changes
  • How to run git checkout in ant?
  • Git: How can I find a commit that most closely matches a directory?
  • What is the difference between local repository and index?
  • Does a commit in Git represent the state of a repository?
  • ERROR: username/Hello-World.git doesn't exist. Did you enter it correctly?

    I think it is because I got the git remote add command wrong: I forgot to substitute my username and repository name. Retrying it with the correct arguments gives me:

    $ git remote add origin
     fatal: remote origin already exists.
    $ git push -u origin master
    Enter passphrase for key '/Users/christinehorvat/.ssh/id_rsa':
     ERROR: username/Hello-World.git doesn't exist. Did you enter it correctly?
     fatal: The remote end hung up unexpectedly'

    How can I clean this up and get the correct remote?

  • maintain, cleanup, compress large number of git repositories in Ubuntu
  • How can I convert to Mercurial without the extra “committer:” line in the log?
  • How to deploy and sync a prototype Clojurescript app with Git?
  • Failed to download zendframework/zendxml from dist:
  • How can I get write access for a deployment key on bitbucket or something like that?
  • Does git fetch operate on ALL branches or just the current branch?
  • One Solution collect form web for “Trouble with first commit to git repository”

    You simply need to remove the origin remote that has the incorrect reference with:

    $ git remote rm origin

    Then restart the add, and push, and you should be good to go.

    $ git remote add origin
    $ git push -u origin master
    Git Baby is a git and github fan, let's start git clone.