[Libre-soc-dev] git forced master reversion on wiki and soc

Adam Van Ymeren adam at vany.ca
Thu Mar 18 19:44:34 GMT 2021

On 2021-03-18 10:47 a.m., Luke Kenneth Casson Leighton wrote:
> ---
> crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
> On Thu, Mar 18, 2021 at 5:39 PM Alain Williams <addw at phcomp.co.uk> wrote:
>> I pulled a couple of hours ago. I pushed something a couple of hours ago.
> this looks fine:
> https://git.libre-soc.org/?p=libreriscv.git;a=summary
>> I have several local changes - not pushed.
>> What do I need to do to get synched with the right tree ?
> the "normal" solution is to blow away the entire tree (without
> checking if that's necessary)
> the not-so-normal solution which is a horrible hack that works
> successfully (other people will scream in horror and say how it's
> "supposed" to be done)
> * edit .git/config and keep it there
> * git checkout {some commit dating back before the forced master push}
> * git branch -D master
> * git checkout -b master
> * save the **OLD** version of .git/config over the top (the -D will
> have deleted the [master] section)
> * git pull origin master
> been using that for several years now, no problzYYzzkrrrrt

I think the easiest and safest solution is to just rename your current 
branch to hold on to it, and check out a new master from origin

$ git fetch

$ git branch -m master broken-master

$ git checkout -b master origin/master

Now you have the option of cherry-picking any work you want to keep from 

> _______________________________________________
> Libre-soc-dev mailing list
> Libre-soc-dev at lists.libre-soc.org
> http://lists.libre-soc.org/mailman/listinfo/libre-soc-dev

More information about the Libre-soc-dev mailing list