Отклонена ошибка в хранилище pu sh в Gitlab - PullRequest
0 голосов
/ 20 апреля 2020

Я хочу добавить sh некоторый тестовый файл в проект myfirstgittrial на GitLab.

Когда я запускаю эту команду git push origin master на терминале Ubuntu, я получаю эту ошибку

To git@gitlab.com:RamS20_2/myfirstgittrial.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@gitlab.com:RamS20_2/myfirstgittrial.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.

И мое значение происхождения

origin  git@gitlab.com:RamS20_2/myfirstgittrial.git (fetch)
origin  git@gitlab.com:RamS20_2/myfirstgittrial.git (push)

1 Ответ

1 голос
/ 20 апреля 2020

Ошибка ясно говорит, что ваша ветвь позади, поэтому сначала сделайте

1. git pull

git add . git commit -m "message" git push origin master или git push

Надеюсь, это поможет

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...