GIT in eclipse: unable to push, after checking out an old version and change that

StackOverflow https://stackoverflow.com/questions/23378979

  •  12-07-2023
  •  | 
  •  

Вопрос

I am using GIT in eclipse. I needed to checkout some older version, so I opened the history in eclipse and right click on the one I wanted and clicked "checkout". I applied the changes I wanted to make, and at the end I used GIT -> commit, and after inserting the description pressed "commit and push". However it said "There is nothing to push". The push button is inactive as well, and when I checked the bitbucket web page related to my source, this last commit is not recorded! what can I do to push this version into bitbucket?

Это было полезно?

Решение

You have a detached head situation. You have to create a temporary branch and merge this branch back.

This should do the trick:

git branch my-temporary-work
git checkout master
git merge my-temporary-work
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top