I started using GitHub this weekend for a new personal project (we also use git at work) and their tutorial has me do the following:
$ mkdir ~/Hello-World
$ cd ~/Hello-World
$ git init
$ touch README
Then after I add my initial commit I add the origin and then can just push:
$ git remote add origin git@github.com:username/Hello-World.git
$ git push origin master
Usually, I have to zip up a new repo, copy it to my server, and then perform a git clone --bare in order to start pushing to it. How is it that they are able to skip this step?
The repo on GitHub is already a bare one, so you can start pushing directly.
(As illustrated on “Setting up backup (mirror) repositories on GitHub“)
More on bare repo in this “all about “bare” repos — what, why” documentation.