Repairing fatal: ref HEAD is not a symbolic ref (git checkout of svn remote)
To test a particular upstream revision, on a git svn remote checkout (i.e. branches/1.2, 76c7af2...), I checked out the equivalent of HEAD^^ (git checkout 4a3d99c0c9).
Now back at the branch tip, I get fatal: ref HEAD is not a symbolic ref on git svn rebase:
(4a3d99c...) $ git checkout 76c7af2
HEAD is now at 76c7af2... Minor changes to CONTRIBUTORS (76c7af2...) $ git svn rebase
fatal: ref HEAD is not a symbolic ref Current branch HEAD is up to date. Segmentation fault
How can I manually correct ref HEAD?
Thanks.
(The segmentation fault is a separate issue)
Quoted 7 lines · Jeff Kowalczyk
To test a particular upstream revision, on a git svn remote checkout (i.e. branches/1.2, 76c7af2...), I checked out the equivalent of HEAD^^ (git checkout
4a3d99c0c9).Now back at the branch tip, I get fatal: ref HEAD is not a symbolic ref on git svn rebase:
Quoted 7 lines
(4a3d99c...) $ git checkout 76c7af2
HEAD is now at 76c7af2... Minor changes to CONTRIBUTORS (76c7af2...) $ git svn rebase
fatal: ref HEAD is not a symbolic ref Current branch HEAD is up to date. Segmentation faultHow can I manually correct ref HEAD?
git checkout whateverbranchyouwereonbefore
git svn rebase
Signature · 1 line
Shawn.
Quoted 14 lines · Shawn O. Pearce
Quoted 13 lines · Jeff Kowalczyk
To test a particular upstream revision, on a git svn remote checkout (i.e. branches/1.2, 76c7af2...), I checked out the equivalent of HEAD^^ (git checkout
4a3d99c0c9).Now back at the branch tip, I get fatal: ref HEAD is not a symbolic ref on git svn rebase:
(4a3d99c...) $ git checkout 76c7af2
HEAD is now at 76c7af2... Minor changes to CONTRIBUTORS (76c7af2...) $ git svn rebase
fatal: ref HEAD is not a symbolic ref Current branch HEAD is up to date. Segmentation fault
Quoted 4 lines
Quoted 1 line
How can I manually correct ref HEAD?
git checkout whateverbranchyouwereonbefore
git svn rebase
Thanks, and the other svn remotes are working fine. I still have the problem on the svn remote 'branches/1.2'. The following illustrates:
(1.2_mybranch) $ git checkout 1.2
Note: moving to "1.2" which isn't a local branch
If you want to create a new branch from this checkout, you may do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at 76c7af2... Minor changes to CONTRIBUTORS
(76c7af2...) $ git svn fetch
M CONTRIBUTORS
M LedgerSMB/AM.pm
r2353 = ddd452af128f9b4698a1c1d6cc7fe2f23a0e6c90 (1.2)
M LedgerSMB/AM.pm
r2354 = fc6857004eeabf6963a9b2856f51db8842c00b70 (1.2) Segmentation fault
(fc68570...) $ git checkout 1.2_print_pdf_default Previous HEAD position was fc68570... (commit message snip) Switched to branch "1.2_print_pdf_default"
(1.2_print_pdf_default) $ git svn rebase
First, rewinding head to replay your work on top of it...
Applying: naive replacement to option selected value="pdf" where PDF is format option, Segmentation fault
(76c7af2...) $ git svn rebase
fatal: ref HEAD is not a symbolic ref
First, rewinding head to replay your work on top of it... Fast-forwarded HEAD to refs/remotes/1.2. Segmentation fault
This last git svn rebase on 'branches/1.2' (whether it's correct procedure or not for a svn remote) used to work without the error until I issued that one command (git checkout 4a3d99c0c9).
Thanks for any suggestions.