persistent detached head state

30 views
Skip to first unread message

Chris Smith

unread,
Apr 6, 2021, 11:05:38 AM4/6/21
to sympy
I tried to rebase (and then decided to merge) a branch with master

git co origin/pr/18489
git rebase master
git rebase --abort
git merge master
git commit
git add sympy/sets/handlers/union.py sympy/sets/tests/test_sets.py sympy/solvers/solveset.py sympy/solvers/tests/test_solveset.py
git commit

The prompt did not return to indicating the branch and showed that it was (detached HEAD|REBASE) so I did

git rebase --continue
git checkout -b iseta
git rebase --abort
git rebase --continue
git diff master > dif_keep
git checkout master

but it is still showing (detached HEAD|REBASE) even though I can look at a commit history and see that I am on the master branch. I even did "git pull" and the master branch updated.

Does anyone know what I can do to get out of this state?

Thanks,
/c

Kalevi Suominen

unread,
Apr 6, 2021, 1:38:12 PM4/6/21
to sympy
On my linux system, I have a .git-prompt.sh file with this snippet of code:

                if [ -d "$g/rebase-apply" ]; then
                        __git_eread "$g/rebase-apply/next" step
                        __git_eread "$g/rebase-apply/last" total
                        if [ -f "$g/rebase-apply/rebasing" ]; then
                                __git_eread "$g/rebase-apply/head-name" b
                                r="|REBASE"

It suggests that there might exits a .git/rebase-apply directory containing a rebasing file. I would consider removing those (after
securing sufficient backup).

Kalevi Suominen

Chris Smith

unread,
Apr 7, 2021, 8:47:31 PM4/7/21
to sympy
I did `mv rebase-merge bakrebase-merge` and all is well, again. Thank you!

/c

Reply all
Reply to author
Forward
0 new messages