b0rk, (edited )
@b0rk@jvns.ca avatar

poll: in git, do you think of "detached HEAD state" and "not having any branch checked out" as being the same thing?

CleoQc,
@CleoQc@mstdn.ca avatar

@b0rk
Honestly, maybe it's because I speak French, but detached HEAD means guillotine to me and has a major eeck effect whenever I see the term.

VZ,
@VZ@fosstodon.org avatar

@b0rk As I voted "no": when I intentionally get to this state, I think about it as "a particular commit checked out". If I get there in the middle of some other operation due to a conflict or whatever, I think about it as just a temporary state, to be left a.s.a.p. after finishing the current operation step.

So while, formally, "detached HEAD" and "no branch" are equivalent, of course, I never actually think about it like that.

b0rk, (edited )
@b0rk@jvns.ca avatar

@VZ thank you! I wasn't thinking about that at all, that's a great point

Anarcat,
@Anarcat@kolektiva.social avatar

@b0rk a technicality maybe, but a bare repository doesn't have a branch checked out, while not being in detached HEAD state :)

b0rk,
@b0rk@jvns.ca avatar

if you replied "no" to this poll I would love to know why! lots of great answers so far and they're helping me think about how to explain detached HEAD state more clearly

Private
Private
kernellogger,
@kernellogger@fosstodon.org avatar

@b0rk

Likely unrelated, but I answered "no" because "not having any branch checked out" made me think of "git clone --no-checkout", which I'd say is not a "detached HEAD state" (but in the end might be, not sure)

ISV_Damocles,
@ISV_Damocles@techhub.social avatar

@b0rk I voted other. Usually that's yes, but sometimes I have a tag checked out which is not a detached HEAD state but doesn't have a branch checked out.

b0rk,
@b0rk@jvns.ca avatar

@ISV_Damocles oh interesting why do you say having a tag checked out is different from a detached HEAD state? (how do you think about the difference?)

ISV_Damocles,
@ISV_Damocles@techhub.social avatar

@b0rk Well, I figured out that I'm wrong about that, but I assumed any named label in git would count as a non-detached HEAD.

b0rk,
@b0rk@jvns.ca avatar

@ISV_Damocles thank you!

tshirtman,
@tshirtman@mas.to avatar

@b0rk i generally don't think about that, but if you put it this way i'd say i agree.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • kavyap
  • mdbf
  • osvaldo12
  • ethstaker
  • tacticalgear
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • modclub
  • Youngstown
  • everett
  • slotface
  • rosin
  • GTA5RPClips
  • provamag3
  • khanakhh
  • cisconetworking
  • tester
  • ngwrru68w68
  • normalnudes
  • Durango
  • InstantRegret
  • cubers
  • megavids
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines