How can I use /home/username/www/example.git with remote add command?
if I use this:
git remote add origin user@example.com:/home/user/www/example.git
git push origin master
I got this error:
error: src refspec master does not match any.
error: failed to push some refs to 'user@example.com:/home/user/www/example.git'
Default behaviour of git push is just to push “matching refs”, i.e. branches which are present both in the local and the remote repository. In your example, there are no such branches, so you need to tell git push which branches to push explicitly, i.e. via
or, if you want to push all branches,