If you want to push your current detached HEAD (check git log
before), try:
git push origin HEAD:master
to send your detached HEAD into master branch at origin. If your push gets rejected, try git pull origin master
first to get the changes from origin. If you don't care about the changes from origin and it's rejected, because you did some intentional rebase and you want to replace origin/master with your currently detached branch - then you may force it (-f
).