git pushを行いたいと思っています。
ですが、現状、git push時に以下のエラーが出ます。
vagrant@ubuntu-xenial:~/workspace/twitter$ git push git@github.com: name/Twitter.git master To git@github.com:Momoko-Takita/Twitter.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@github.com: name /Twitter.git' 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 pullが必要だと考えたのでgit pullしたら以下のエラーが出ました
agrant@ubuntu-xenial:~/workspace/twitter$ git pull git@github.com: name /Twitter.git master warning: no common commits remote: Enumerating objects: 96, done. remote: Counting objects: 100% (96/96), done. remote: Compressing objects: 100% (81/81), done. remote: Total 96 (delta 2), reused 96 (delta 2), pack-reused 0 Unpacking objects: 100% (96/96), done. From github.com: name /Twitter * branch master -> FETCH_HEAD Auto-merging package.json CONFLICT (add/add): Merge conflict in package.json Auto-merging db/schema.rb CONFLICT (add/add): Merge conflict in db/schema.rb Auto-merging config/secrets.yml CONFLICT (add/add): Merge conflict in config/secrets.yml Auto-merging config/routes.rb CONFLICT (add/add): Merge conflict in config/routes.rb Auto-merging config/environments/production.rb CONFLICT (add/add): Merge conflict in config/environments/production.rb Auto-merging config/database.yml CONFLICT (add/add): Merge conflict in config/database.yml Auto-merging config/cable.yml CONFLICT (add/add): Merge conflict in config/cable.yml Auto-merging config/application.rb CONFLICT (add/add): Merge conflict in config/application.rb Auto-merging bin/rake CONFLICT (add/add): Merge conflict in bin/rake Auto-merging bin/rails CONFLICT (add/add): Merge conflict in bin/rails Auto-merging app/views/layouts/application.html.erb CONFLICT (add/add): Merge conflict in app/views/layouts/application.html.erb Auto-merging app/assets/javascripts/application.js CONFLICT (add/add): Merge conflict in app/assets/javascripts/application.js Auto-merging README.md CONFLICT (add/add): Merge conflict in README.md Auto-merging Gemfile.lock CONFLICT (add/add): Merge conflict in Gemfile.lock Auto-merging Gemfile CONFLICT (add/add): Merge conflict in Gemfile Auto-merging .gitignore CONFLICT (add/add): Merge conflict in .gitignore Automatic merge failed; fix conflicts and then commit the result.
・このエラーが出たのでmergeする必要があると考えたので
vagrant@ubuntu-xenial:~/workspace/twitter$ git push git@github.com:name/Twitter.git fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream git@github.com:name/Twitter.git master
あとはエラーに対処していっただけです、、、
vagrant@ubuntu-xenial:~/workspace/twitter$ git push git@github.com:name/Twitter.gitmaster fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream git@github.com:name/Twitter.gitmaster master
vagrant@ubuntu-xenial:~/workspace/twitter$ git push --set-upstream git@github.com:name/Twitter.gitmaster master ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
ブランチはMasterブランチしかありません。
今はgit pull を行っても以下のエラーが起きるようになりました。
fatal: This operation must be run in a work tree
###お尋ねしたいこと
git push ができない原因はmergeができていないことが原因だと考えてるのですが、
なかなかマージがうまくいきません。
マージの仕方が悪いのでしょうか?
また、うまくいっていない理由は他にあるのでしょうか?
よろしくお願いいたします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/02 23:46