Hacker Newsnew | past | comments | ask | show | jobs | submit | jbjbjbjb's commentslogin

I think ‘git rebase —-update-refs’ is the better way to go for this scenario

Sweet, looks like this is pretty new (2022).

Running a git command on one branch and multiple branches being affected is really unusual for me! This really does look like it is designed for just this problem, though. Simple overview: https://blog.hot-coffee.dev/en/blog/git_update_refs/


It breaks if you amend the top commit instead of adding a new one.

Is there any good guide on how to solve the issue which OP solves?

I was reading this the other day when I came across this feature because I’m stacking PRs recently which I don’t usually do

https://andrewlock.net/working-with-stacked-branches-in-git-...

Another commenter posted this link which was a bit more succinct

https://blog.hot-coffee.dev/en/blog/git_update_refs/

There isn’t much to it though, you just go to the branch and run git rebase with the update refs flag.


You don’t really need docs as --update-refs does what the OP does automatically instead of manually like the OP does.

How? I tried recreating the scenario from the article (the section "First rebase –onto") and ran the first rebase with "--update-refs":

  $ git checkout feature-1
  $ git rebase --update-refs main
  Successfully rebased and updated refs/heads/feature-1.
  Updated the following refs with --update-refs:
   refs/heads/feature-2-base
But all it did was update feature-2-base. It still left feature-2 pointing to the old commits. So I guess it automates "git branch -f feature-2-base feature-1" (step 3), but it doesn't seem to automate "git rebase --onto feature-1 feature-2-base feature-2" (step 2).

Presumably I'm doing something wrong?


Yeah, you need to rebase the tip of the feature branch stack. git will then update all the refs that point to ancestor commits that are moved. So in this case

    $ git rebase --update-refs main feature-2

Thanks! Yup, that does the trick.

First, you don't need the extra "marker" commit. This flag obviates the entire workflow.

Second, you run it on the outermost branch: feature 2. It updates all refs in the chain.


The article suggests there’s evidence that screen time has the opposite effect. A little surprising but I guess for a lot of people it is more stimulating than watching the news or soaps all day


It says it’s unclear which way the causation goes.


> The world is getting stranger

In the U.K. I was betting 5 minute binary options back in 2008 and parlays or accumulators as we call them (accys for short) have been popular for a while too.


Rightly or wrongly, The Gambling Act 2005 put the UK literally decades ahead of places like the US in terms of creating a legal framework for sports betting/gambling in general.


And that's how you get a Paddy Power next to a William Hill while the rest of the high street is shuttered.


And Betfred just threatened to close 1,300 high street betting shops if Reeves increases gambling taxes in the budget next month.

https://www.ft.com/content/3641f944-38cc-4ed5-853a-03fab3ac4...


How is that a threat?


Do you think that's better or worse than an entirely shuttered high street? Why?


Those are the choices? I hope not.

The forces that made those shops appear and made the greengrocers disappear are not natural, inevitable, and foolish to resist. They are just laws, laws that permitted some things and discouraged others, taxed some things and subsidized others.


Because the gambling industry is a parasite.


In my experience there’s still much more to this. I’m sure it helps at population level like the article describes but it’s not foolproof. For our first we were feeding nuts early and still developed an allergy to all nuts. Our second didn’t get nuts until much later and he’s fine. There’s more to the story than timing, notably my first has eczema and asthma too so there’s that atopic march.


> There’s more to the story than timing, notably my first has eczema and asthma too so there’s that atopic march.

Eczema often comes with digestive issues, bowl inflammation, loose stool, blood in the stool etc.

Eczema essentially gives you wounds, if you allow allergens to enter the bloodstream directly without going through the digestive tract you are at an increased risk of developing allergies.

For kids/babies with these kind of issues it's probably better to delay introducing common allergens until their gut can heal or you will end up causing allergies rather than preventing them.

Source: https://pmc.ncbi.nlm.nih.gov/articles/PMC7494573


Allergy rate decreases with birth order. Of course, that's at the population level and probably not strong enough effect to notice if you only poll a dozen parents you know.


As the 3rd child that had more allergies than I can really make sense of, I'm curious on this. Any recommended studies to read up on this?


Did you medicate for reflux?


No we didn’t


I’m glad I opted to get the base model M4 Mac Mini rather than upgrade the memory for longevity.


Sadly, the majority of the people want these policies because they’ve been brainwashed or they’re too apathetic to care. The major political parties want it too. Democracy is flawed.


That looks great, a nice upgrade over the 500 but I’d buy it just for the echoes of Amiga 500 plus.


I couldn’t agree more. I think we should just write our pipelines in languages our teams are familiar with and prioritise being able to run them locally.


> prioritise being able to run them locally.

That is the key function any serious CI platform needs to tackle to get me interested. FORCE me to write something that can run locally. I'll accept using containers, or maybe even VMs, but make sure that whatever I build for your server ALSO runs on my machine.

I absolutely detest working on GitHub Actions because all too often it ends up requiring that I create a new repo where I can commit to master (because for some reason everybody loves writing actions that only work on master). Which means I have to move all the fucking secrets too.

Solve that for me PLEASE. Don't give me more YAML features.


+1

Working with ADO pipelines is painful.

- Make change locally

- Push change

- Run pipeline

- Wait forever because ADO is slow

- Debug the error caused by some syntax issue in their bastardized version of yaml

- Repeat


Gitlab does this locallyand i asdume in their cloud


People don’t have a nuanced view of when to use sunscreen. You can see for yourself in the comments, there’s plenty of loud certainty and context is left behind. And I’d have expected this group to at least understand that the need for sunscreen is based on the position of the sun during the day.


Probably mitigated by the fact that the most popular SUVs in the UK are effectively just tall hatchbacks. People think Range Rovers but the bestsellers are like Kia Sportage and Ford Puma.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: