Instructions on bare repo for pushing up from existing folder need to tell user to commit
Created by: pbx
When you go to the home page of a project with an empty repo, the "Existing folder or Git repository" instructions are:
cd existing_folder
git init
git remote add origin [email protected]:repo.git
git push -u origin master
This probably works if you are pushing from an existing Git repo. However, if you execute the above verbatim in an existing folder that is not already a Git repo, the last command fails with:
error: src refspec master does not match any.
error: failed to push some refs to [email protected]:repo.git
The missing piece is: if the user is creating a new git repo locally, they need to make a commit before trying to push.