kochigami / cultural_festival

new repository for cultural festival
0 stars 1 forks source link

non-fast-forwardとなりpushができない #1

Closed kochigami closed 9 years ago

kochigami commented 9 years ago

githubでレポジトリを作り、README.mdを編集しました。 さらに、webでREADME.mdを書き直しました。 すると、競合が起きて、 To https://github.com/kochigami/cultural_festival.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/kochigami/cultural_festival.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details. とでてしまいます。 競合をどのように解決できますか。

kochigami commented 9 years ago

まず git fetch を行い、 git merge origin/master して、 Merge made by the 'recursive' strategy. README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 README.md 解決出来ました。

git fetchはリモートレポジトリの最新の履歴の取得だけを行います。

git add euslisp/cultural_fest_2014_10_26.l git commit -m "first commit test" git remote add origin https://github.com/kochigami/cultural_festival.git fatal: remote origin already exists. (すでにやっていたのを忘れていた) git push -u origin master

で無事にpush出来ました。