Re: Deleted the last week of commits in main

Dawid Weiss <[email protected]>
Newsgroups gmane.comp.jakarta.lucene.devel
Message-ID <CAM21Rt8-qRkJPuGCS=LUG=q+kwr3BNM-TCH7qan3hA4fUpgRFA@mail.gmail.com>
> (we still need to confirm if the wildcards work but these branches should
> be safe).
>

Wildcards don't work but I added all the branch_* branches manually.


> Folks, you might see "git pull" fail with a fatal, due to remote branch
> being overwritten.
>

So it's caused by the fact that I manually cherry picked that single commit
I somehow overlooked (which caused the remote to deviate from what you
might have had pulled before). I could have fixed it too by doing another
force-push
with the original commit but in the end I didn't think it's that relevant.

Just resetting your local main branch to a few commits back and doing a git
> pull should fix it.


Correct. If you don't have any local changes on main (which you shouldn't
have), and you *are* on the main branch, this will do the trick (if you
have multiple remotes, you'll know which one is the right one...):

git fetch origin
git reset --hard origin/main

Dawid
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.