Git push and pull не работает, отредактированный код не сливается с существующим репо - PullRequest
0 голосов
/ 11 февраля 2019

Я пытаюсь подтолкнуть некоторые изменения к существующему репозиторию github.Я клонировал репозиторий на свой компьютер, изменил несколько строк в некоторых файлах из него и затем попробовал git push origin master.Это возвращает это:

To https://github.com/judah-tw/myrepo.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/judah-tw/myrepo.git'
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.

Я пытаюсь мастер происхождения git pull, и это показывает:

warning: no common commits
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 85 (delta 19), reused 13 (delta 13), pack-reused 62
Unpacking objects: 100% (85/85), done.
From https://github.com/judah-tw/myrepo.git
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
Auto-merging readme.txt
CONFLICT (add/add): Merge conflict in readme.txt
Auto-merging main.c
CONFLICT (add/add): Merge conflict in main.c
Automatic merge failed; fix conflicts and then commit the result.

git merge возвращает это:

error: merge is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

Что этозначит исправить их в рабочем дереве?Я следовал инструкциям на https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/, но они не работают для меня.

...