News for hackers. Stuff that matters.
Re:Git undo: We can do better by lmm on Tuesday June 22, 2021 @04:33AM (#27589326)
> There are some cases where git can delete the branch safely, which I think occurs either when the feature branch has only a single commit, or when the feature branch can be applied on top of main without a rebase, but I haven't exactly determined it.

FWIW: it occurs when the feature branch was based on the tip of master (because no-one else has committed to master since you branched/since you rebased onto master) - in this case rebasing your feature branch onto master is a no-op and the commits that go into master have the same hashes as they had on your feature branch.

There are no comments on this comment yet.