いつもお世話になっております。
タイトル通りなのですが、「$ bundle exec rails new .」にてrailsプロジェクトを作成したばかりの初期状態をテスト的にGitHubにpushしようとしています。コマンドは下記のような流れでエラーが出ています。ググってみるといろいろと同じようなエラーがあり、いづれも<試したコマンド>のような内容で解決しているようなのですが、解決でできずこちらに質問させていただきました。
GitHubは初めて触るので、不勉強で大変申し訳ございませんがご教示いただけますと幸いです。
よろしくお願いいたします。
環境:Amazon Linux release 2 (Karoo)
<実際の流れ>
$ cd /home/rails/プロジェクト名
$ git config --global user.name "名前"
$ git config --global user.email "アドレス"
$ git config --global color.ui true
$ git init
$ git add .
$ git commit -m "初コミット"
$ git remote add origin https://github.com/名前/プロジェクト名.git
Username for 'https://github.com': "名前"
Password for 'https://xxxxxxx@github.com':"pass"
To https://github.com/名前/プロジェクト名.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/名前/プロジェクト名.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and 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.
<試したコマンド>
git pull
git pull --rebase origin master
git fetch
git merge master
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/02/14 02:53