重複した質問かもしれませんが、既存の質問から回答を見つけようとしましたが失敗しました。
次のコマンドを使用して、サーバー上に git リポジトリを作成しました。
mkdir gitrepo
cd gitrepo
git init
次に、別のマシンからこのリポジトリにファイルをプッシュしようとしましたが、失敗しました。
git init
git clone user@server:~/gitrepo/.git
cd gitrepo
touch test
git add test
git commit -a
今のところ、エラーは発生していません。変更をサーバーにプッシュしようとすると、次のエラーが発生します。
>git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'user@server:~/gitrepo/.git'
以前にこの問題に遭遇した人はいますか?
非ベアリポジトリとベアリポジトリの違いをよく説明しているブログを見つけました。http://www.bitflop.com/document/111 同じ問題を抱えている人は参考にしてみてください。