tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] recover commits on mob


From: Herman ten Brugge
Subject: Re: [Tinycc-devel] recover commits on mob
Date: Tue, 5 Jan 2021 19:48:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

I reapplied the last 2 patches again.

    Herman

On 1/5/21 7:35 PM, Danny Milosavljevic wrote:
Hi,

On Tue, 5 Jan 2021 18:12:35 +0000
Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:

I just pushed a fix-up to the 'mob' branch to recover three
commits which had been 'overwritten' somehow. (Danny, did
you not see an error message when you tried to push?).
Thank you!

I've reconstructed what could have happened.

In the current tinycc-suggested workflow

   git push ssh://mob@repo.or.cz/srv/git/tinycc.git arm-asm:mob

it turns out that the colon separates the local branch from the upstream branch,
so, here, it pushes my branch "arm-asm" as the upstream branch "mob" (WTF!).
That sounds dangerous.  Also, it is not what I thought that does.

So I think what happened is that one time I force-pushed and overwrote the mob
branch with a command like the one above (sorry).  It should have only affected
a tiny bit though since I rebase arm-asm on top of mob.

In the future, I'll switch over to using this instead (while working
in the local "arm-asm" branch):

git checkout mob
git pull --rebase

git checkout arm-asm
git rebase mob

git checkout mob
git merge arm-asm
git push -u origin mob # the first time; later times just "git push".

That would make merges explicit and would thus be much safer.  Also, it's
how I use git elsewhere.

(I had never seen the foo:bar with URL push syntax before)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]