内容へ移動
とあるエンジニアの闇歴史帳
コピペで使える便利Wiki ※現在構築中です。
ユーザ用ツール
ログイン
トレース:
git:git_error1
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== 初回の git push でエラーが出る場合の対処法 ====== ~~socialite~~ commitを行いまっさらなリポジトリに意気揚々とgit pushをかけようとすると、以下のようなエラーが出る場合があります。 ===== fatal: The remote end hung up unexpectedly ===== <code> $ 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 'ssh://git.example.org:50022/reposgit/endymion.git' </code> ===== git push origin master ===== このエラーは一体どこにファイルをアップすればいいの?という意図になりますので、「git push」のあとに当該部分を指定してやれば解決します。 <code> $ git push origin master Counting objects: 190, done. Delta compression using up to 4 threads. Compressing objects: 100% (186/186), done. Writing objects: 100% (190/190), 270.51 KiB, done. Total 190 (delta 34), reused 0 (delta 0) To ssh://git.example.org:50022/reposgit/endymion.git * [new branch] master -> master </code> originは接続先のサーバの略称、 masterはデフォルトのブランチ名にあたります。 2回目以降はgitがいい感じに処理してくれますので、必要がなければ指定しなくて大丈夫です。 <code> $ git push Everything up-to-date </code> ===== 参考 ===== = Git超入門:"git push origin master"の"push"と"origin"と"master"の意味がわからないあなたへ : http://dqn.sakusakutto.jp/2011/10/git_push_origin_master.html ===== 関連書籍 ===== {{amazon>jp:4798023809}} <html><p style="clear:both"></p></html> {{amazon>jp:477416366X}} <html><p style="clear:both"></p></html> {{amazon>jp:4774164283}} <html><p style="clear:both"></p></html> {{amazon>jp:B00Y2FKN9C}} <html><p style="clear:both"></p></html> {{tag>git git_push origin master エラー}} ~~socialite~~
関連ページ
git/git_error1.txt
· 最終更新: 2020/06/23 14:10 (外部編集)
ページ用ツール
文書の表示
バックリンク
文書の先頭へ