Re: Rescue Plan for apt-listbugs
On Sun, Oct 10, 2010 at 1:22 AM, Francesco Poli <firstname.lastname@example.org> wrote:
> [I wasn't Cc:ed, hence I see your message only now, and I am replying
> after manually quoting the text from the web archive and manually
> setting the In-Reply-To field: I hope this won't break the thread;
> apologies if it does!]
> What if I already have the cloned repository (I've used it so far to
> prepare patches that I've sent to Ryan via e-mail...) and it was cloned
> via the git protocol at the time?
> Please take into account that I also already have a local branch
> waiting to be pushed to the public repository as a new series of
> commits for the "master" branch...
> Should I start from scratch, clone the public repository over ssh, and
> then somehow transfer my local commits from my old cloned repository to
> the newly cloned one? How?
> Or is there a better way to deal with this situation?
I would delete the remote that clones over git:// and rename the other one.
git remote rm origin
git remote rename alioth origin
>> > $ git checkout -b $MY_COOL_BRANCH_NAME origin
>> You want origin/master here.
> I thought that "origin" was a shortcut for "origin/HEAD":
> and "origin/HEAD" seems to be equivalent to "origin/master" on my
> cloned repository:
When I do your proposed command I get this:
$ git checkout -b test origin
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'origin' which can not be resolved as commit?
> $ git branch -r
> origin/HEAD -> origin/master
> Anyway, if I understand correctly, your suggestion is to use
> "origin/master", since it is a more general strategy.
Hmm, I don't have origin/HEAD on the test repo I was using:
$ git branch -r
>> > $ git checkout $MY_COOL_BRANCH_NAME && git rebase origin
>> Probably s/origin/master/
> "origin" and "master" should be identical at this point, since I've
> just pulled while on branch "master".
> Or am I wrong?
> Anyway, since I am then going to pull the rebased branch on the
> "master" branch, you're probably right that the most correct rebase is
> a "git rebase master".
> Could you please confirm that this is what you meant?