###前提・実現したいこと
githubのリモートリポジトリにpushしたい
###発生している問題・エラーメッセージ
以下のサイトを参考にして,Githubを初めて使ってみようとしました.
[Githubの使い方(超初心者向け)]
(https://techacademy.jp/magazine/6235)
ここに書いてある通り進めていったのですが,
git remote add origin https://github.com/ユーザー名/test
git push origin master
ここで,つまづいてしまい,リモートリポジトリにプッシュできません.
エラーメッセージ failed to push some refs to 'https://github.com/ユーザID/test' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
###試したこと
ググってみたところ,下記のサイトで書かれていることを試しました.
git push がrejectされた時の対応
方法1)とりあえずgit pullをする.
結果1)
git pull (この後何を書けばいいのかわかりません)
方法2)fetchしてmergeする.
git fetch git merge origin/master
結果2)
refusing to merge unrelated histories
方法3)fetchしてrebaseする
git fetch git rebase origin/master
結果3)
Cannot rebase: Your index contains uncommitted changes. Please commit or stash them.
超初歩的質問ですみません.もし,何かわかることがあれば教えていただきたいです.
###補足情報(言語/FW/ツール等のバージョンなど)
より詳細な情報
実行環境 MacBookPro
git version 2.9.3 (Apple Git-75)

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/02/11 01:51