• alsimoneau@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      No, git has labels on heads of branches. Once the head moves you loose the information. It also makes for a more messy history, which I believe created the whole “rebase everything” philosophy to cope.

        • bleistift2@sopuli.xyz
          link
          fedilink
          English
          arrow-up
          0
          ·
          edit-2
          16 days ago

          If I hand you a commit, you cannot tell which ‘branch’ it is on without searching the git history and hoping that you only get one answer. That’s a bummer if, for instance, you’re a github action and only get handed the commit. If it’s on the master branch, I want to do different things than if it’s a dev branch.

          • SpaceNoodle@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            16 days ago

            A commit all by itself doesn’t mean as much without context.

            Why would I not want to be able to apply a commit to any arbitrary branch?

            Also, GitHub is not git - it’s based on git. Any shortcomings it may have aren’t necessarily due to a flaw in git.

            • bleistift2@sopuli.xyz
              link
              fedilink
              English
              arrow-up
              0
              ·
              edit-2
              16 days ago

              A commit all by itself doesn’t mean as much without context.

              Luckily a commit points to its parent, which means the context is inherently present. What’s your point?

              Why would I not want to be able to apply a commit to any arbitrary branch?

              Nobody said that.

              Any shortcomings it may have aren’t necessarily due to a flaw in git.

              True enough.