私はこれを試していました:
mkdir ~/gitremote
cd ~/gitremote
git init --bare
次のようなファイル名が表示されます
HEAD config hooks objects
branches description info refs
OK、それから別のディレクトリで、
git clone trosky@localhost:/Users/trosky/gitremote
vi readme (add one line)
git add .
git commit -m "1st file"
git push origin master
次に、エラーが発生します。
$git push origin master
error: src refspec master does not match any.
error: failed to push some refs to 'trosy@localhost:/Users/trosky/gitremote'
Googleで検索したところ、この種のエラーはリモートリポジトリの空のフォルダーが原因であると表示されています。しかし、リモートリポジトリは空ではなく、ローカルでも空ではないファイルをコミットしています。このエラーがまだ表示されるのはなぜですか?
修正方法は?ありがとう。