I
I
IvanN7772014-11-24 11:15:17
git
IvanN777, 2014-11-24 11:15:17

Can't push after git checkout 86ea83fa5fc913dfee7d0337f50d28bf1795b8fb hash, what should I do?

git status says

HEAD detached from 86ea83

git push writes
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:

How, after rolling back to the old branch, make it the top one? without merge. Because the previous one contains undetected errors.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
jcmvbkbc, 2014-11-24
@IvanN777

How, after rolling back to the old branch, make it the top one?

You are not in the thread. To set the branch head to the desired commit, check out the branch and do a git reset --hard on it:
git checkout <branch-name>
git reset --hard 86ea83
git push origin +HEAD

I
IvanN777, 2014-11-24
@IvanN777

git checkout git reset --hard
86ea83 git push
origin + HEAD based on the source ref. error: failed to push some refs to ' https://[email protected]/alexeyk13/coca-cola.git '

R
Roman, 2017-02-28
@homsi959

https://github.com/d3/d3/wiki/Gallery

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question