@IvanN777

Не могу запушить после git checkout 86ea83fa5fc913dfee7d0337f50d28bf1795b8fb hash, что делать?

git status пишет
HEAD detached from 86ea83


git push пишет

fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use
git push origin HEAD:


Как после отката на старую ветку, сделать ее верхней? без merge. Потому что предыдущая содержит не выявленные ошибки.
  • Вопрос задан
  • 6255 просмотров
Решения вопроса 1
jcmvbkbc
@jcmvbkbc
"I'm here to consult you" © Dogbert
Как после отката на старую ветку, сделать ее верхней?

HEAD detached from 86ea83

Вы не в ветке находитесь. Чтобы голову ветки установить на нужный коммит вычекните ветку и сделайте git reset --hard на ней:

git checkout <branch-name>
git reset --hard 86ea83
git push origin +HEAD
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
@IvanN777 Автор вопроса
git checkout
git reset --hard 86ea83
git push origin +HEAD
Пишет:
error: unable to push to unqualified destination: HEAD
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'https://YonRat@bitbucket.org/alexeyk13/coca-cola.git'
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы