git svn rebase problem

5 messages, 4 authors, 2016-06-15 · open the first message on its own page

git svn rebase problem

From: David H. Lynch J.r <hidden>
Date: 2016-06-15 22:46:46

For some time I am using git svn to manage a local copy of a remote svn
repository.

The svn repository has no branches.

A few days ago I did an
git svn rebase

The rebase took a while and after it completed reported
fatal: bad object HEAD

git status reports
root@hp-dhlii:/usr/src/pico/git# git status
# Not currently on any branch.
fatal: bad object HEAD

and git fsck reports
root@hp-dhlii:/usr/src/pico/git# git fsck
dangling blob eb3afb4aa3aaf0003bac601a5db4fd76aafa2a87
dangling commit 5c496db25007c17c325f294bb8324097c9bc407d

How can I recover without downloading the entire repository again which
could take days?

Re: git svn rebase problem

From: Avery Pennarun <hidden>
Date: 2016-06-15 22:46:46

On Fri, May 15, 2009 at 5:21 PM, David H. Lynch J.r [off-list ref] wrote:
A few days ago I did an
git svn rebase

The rebase took a while and after it completed reported
fatal: bad object HEAD

git status reports
root@hp-dhlii:/usr/src/pico/git# git status
# Not currently on any branch.
fatal: bad object HEAD

and git fsck reports
root@hp-dhlii:/usr/src/pico/git# git fsck
dangling blob eb3afb4aa3aaf0003bac601a5db4fd76aafa2a87
dangling commit 5c496db25007c17c325f294bb8324097c9bc407d

How can I recover without downloading the entire repository again which
could take days?
I don't know how this would happen; it would be great if you could
find reproduction steps and send them in, or if you had the complete
git rebase log, some of which probably explains the problem.

You can probably recover your pre-rebased repository using 'git
reflog'.  Look through the reflog to find the commit you want, then do
something like

    git checkout whatever-the-commit-id-was-that-you-got-from-git-reflog

and then optionally

    git checkout -b master

Good luck.

Avery

Re: git svn rebase problem

From: John Tapsell <hidden>
Date: 2016-06-15 22:46:47

2009/5/16 Avery Pennarun [off-list ref]:
On Fri, May 15, 2009 at 5:21 PM, David H. Lynch J.r [off-list ref] wrote:
quoted
A few days ago I did an
git svn rebase

The rebase took a while and after it completed reported
fatal: bad object HEAD
We had this come up about once a week when using http as the
transport.  After switching most people over to ssh the problems
disappeared.  We never managed to find out why.
quoted
git status reports
root@hp-dhlii:/usr/src/pico/git# git status
# Not currently on any branch.
fatal: bad object HEAD

and git fsck reports
root@hp-dhlii:/usr/src/pico/git# git fsck
dangling blob eb3afb4aa3aaf0003bac601a5db4fd76aafa2a87
dangling commit 5c496db25007c17c325f294bb8324097c9bc407d

How can I recover without downloading the entire repository again which
could take days?
I don't know how this would happen; it would be great if you could
find reproduction steps and send them in, or if you had the complete
git rebase log, some of which probably explains the problem.

You can probably recover your pre-rebased repository using 'git
reflog'.  Look through the reflog to find the commit you want, then do
something like

   git checkout whatever-the-commit-id-was-that-you-got-from-git-reflog

and then optionally

   git checkout -b master

Good luck.

Avery
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: git svn rebase problem

From: Matthias Andree <hidden>
Date: 2016-06-15 22:46:47

Am 15.05.2009, 23:21 Uhr, schrieb David H. Lynch J.r [off-list ref]:
For some time I am using git svn to manage a local copy of a remote svn
repository.

The svn repository has no branches.

A few days ago I did an
git svn rebase

The rebase took a while and after it completed reported
fatal: bad object HEAD

git status reports
root@hp-dhlii:/usr/src/pico/git# git status
# Not currently on any branch.
fatal: bad object HEAD

and git fsck reports
root@hp-dhlii:/usr/src/pico/git# git fsck
dangling blob eb3afb4aa3aaf0003bac601a5db4fd76aafa2a87
dangling commit 5c496db25007c17c325f294bb8324097c9bc407d

How can I recover without downloading the entire repository again which
could take days?
Have you been working on a branch other than the one that git-svn created  
for you? If so, you may have to "git checkout" the original branch before  
being able to "git svn rebase".

Branches and git-svn don't mix.

-- 
Matthias Andree

Re: git svn rebase problem

From: Avery Pennarun <hidden>
Date: 2016-06-15 22:46:47

On Mon, May 18, 2009 at 4:38 AM, Matthias Andree [off-list ref] wrote:
Have you been working on a branch other than the one that git-svn created
for you? If so, you may have to "git checkout" the original branch before
being able to "git svn rebase".

Branches and git-svn don't mix.
That's not exactly true: merging and git-svn don't mix.  But rebasing
works fine.

If you have a separate branch and do 'git svn rebase', then as far as
I know, the original git-svn branch(es) will get updated to the latest
version from svn, and then your current branch will be rebased on top
of it.  This is often what you want, unless you've been using 'git
merge' from that branch.  Rebasing (unless you know exactly what
you're doing) always messes up git merge.

Have fun,

Avery
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help