GitHubでPrivate(You choose who can see and commit to this repository.)に設定したRepositoryにpushしようとすると、下のようなエラーが発生しました。
該当のソースコード
terminal
1$ git add ファイル名 2$ git commit -m "test" 3$ git remote add origin https://github.com/ユーザー名/Reoisutiry名 4$ git push origin master
###エラーメッセージ
To https://github.com/ユーザー名/Reoisutiry名 ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/ユーザー名/Reoisutiry名' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
試したこと
Private(You choose who can see and commit to this repository.) から
Public (Anyone can see this repository. You choose who can commit.) へ変更(公開設定にする)
=> 成功
追記
https://www.softel.co.jp/blogs/tech/archives/3569 を参考に
** => 進展なし**
補足情報
gitのバージョン: 2.21.0
OS: macOS High Sierra 10.13.6
git config user.name
,git config user.email
どちらも登録した情報とあっている
抜けている情報等あれば指摘いただけば提示します
回答よろしくお願いします
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。