[llvm-dev] I've intertwined two branches

Stella Laurenzo via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 8 08:01:00 PDT 2021


Git happens to the best of us :)

Since you've already pushed, upstream should be considered source of truth.
If I were you, I would start a new branch, pull fresh from upstream and
then git cherrypick commits you want to keep from your local branches into
the new branch. The git reflog is your friend on this, especially if you
start resetting, etc.

Since I see you are on Windows, I recall some of these things to be fairly
easy with the Forks git gui.

There are probably better ways to repair, but for me, when I mess it all
up, I find it easier to low tech reconstruct what I want vs advanced
solutions.

On Thu, Apr 8, 2021, 6:12 AM Paul C. Anagnostopoulos via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Somehow I have managed to intertwine two branches in my local repository.
> They are 'assert' and 'lists'. Here is what I see:
>
>   Switched to branch 'assert'
>   c:\llvm\llvm-project> git log2
>   14580ce2fdd1 (HEAD -> assert, origin/main, origin/HEAD, main, lists)
> [TableGen] Make behavior of list slice suffix consistent across all values
>   3b9a15d910a8 [TableGen] Add support for the 'assert' statement in
> multiclasses
>    Switched to branch 'lists'
>   c:\llvm\llvm-project> git log2
>   14580ce2fdd1 (HEAD -> lists, origin/main, origin/HEAD, main, assert)
> [TableGen] Make behavior of list slice suffix consistent across all values
>   3b9a15d910a8 [TableGen] Add support for the 'assert' statement in
> multiclasses
>
> I have no idea how I did this. Unfortunately, I ended up pushing both
> revisions when I meant to push only the 'lists' branch. I could use some
> help sorting out my local repository.
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210408/f1f1e1db/attachment.html>


More information about the llvm-dev mailing list