• Jade@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    13 hours ago

    The last one can easily describe Django. Feels like depending on the code base/your mistakes/people you work with can easily turn a normal project into a project where majority of the files is just migration files.

    • Echo Dot@feddit.uk
      link
      fedilink
      arrow-up
      5
      ·
      24 hours ago

      It’s one of those things that’s hard to really understand why it’s so useful, until you actually use it.

  • yogsototh@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    1 day ago
    cp $fic $fic.$(date -Iseconds)
    git commit -a -m "save at $(date -Iseconds)"
    # edit $fic
    git commit -a -m "save at $(date -Iseconds)"
    git push -f
    
  • tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    35
    ·
    edit-2
    2 days ago
    cd ~/repos/work-project27
    git checkout dev
    git branch new_feature
    ### code for a few hours, close laptop, go to sleep, next morning
    git checkout dev
    ### code for a few more hours, close laptop go to sleep, next morning
    ## "oh fuck, I already implemented this in new_feature but differently"
    git checkout dev
    git diff new_feature
    ## "oh no. oh no no no. oh fuck. I can't merge any of this upstream and my history is borked."
    git clone git@workhub:work/work-project work-project28
    cd ~/repos/work-project28
    
    • Jyek@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      I’m pretty sure it means, they copy and paste the project file and iterate the version number manually.

  • Tamlyn@lemmy.zip
    link
    fedilink
    arrow-up
    17
    ·
    2 days ago

    At university there were some students that want to manage projekts in could storange. That was just stupid but i didn’t know it better at that time.

    • nogooduser@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 days ago

      It’s definitely up with Git in my opinion. I much prefer the branching in Mercurial.

      It’s certainly very offensive to lump it in the same band as SVN and TFVC.

        • nogooduser@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 days ago

          It’s not the mechanism of branching that I prefer.

          It’s the fact that Mercurial tags the commit with the name of the branch that it was committed to which makes it much easier to determine whether a commit is included in your current branch or not.

          Also, Mercurial has a powerful revision search feature built in which I love (https://www.mercurial-scm.org/doc/hg.1.html#revisions).

          • bleistift2@sopuli.xyz
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 day ago

            I admit that I have been bitten by the fact that commits don’t have a “true home branch”.

          • balsoft@lemmy.ml
            link
            fedilink
            arrow-up
            2
            ·
            1 day ago

            It’s the fact that Mercurial tags the commit with the name of the branch that it was committed to which makes it much easier to determine whether a commit is included in your current branch or not.

            Isn’t this trivial in Git too? git branch --contains COMMIT ?

            • Alphare@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              1 day ago

              Sure, if you want to do it once, but Git still has to compute that information (save for a new-ish cache that is just that, a cache). But that is not the point really, the point is that Mercurial’s graph Is the same (topologically) everywhere, which is not the case in Git because branches (and thus remotes) have different names. So saying that a branch contains a commit is not the same as a commit being on a branch. There are a bunch of great properties that emerge from this but it’s too long for this comment and I should actually properly write this down at some point this year.

      • Alphare@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        2 days ago

        Given that Git and Mercurial were both created around April 2005 to serve the same purpose by very similar people for the same reason… I’d say it’s fair!

  • mEEGal@lemmy.world
    link
    fedilink
    arrow-up
    14
    arrow-down
    2
    ·
    2 days ago

    the last one is just immutability, praised in modern JS / TS, albeit at the repo level

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      16
      ·
      2 days ago

      I “love” how JavaScript has slowly rediscovered every piece of functional programming wisdom that was developed before 1980.

      • expr@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        Kind of, though they honestly just do pretend immutability. Object references are still copied everywhere.

        • frezik@midwest.social
          link
          fedilink
          arrow-up
          2
          ·
          2 days ago

          I find you need the whole ecosystem to support immutability to make it work. Every library needs to be based around it. Elixir is about the only modern option that does.

    • lars@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      And when it’s release, then you rename it to

      MyProject - Copy v2.bak new NEW (3) FINAL.2-19-24/

      and then at the next standup, we all ponder how we can rename it to

      MyProject - Copy v2.bak new NEW (3) FINAL.2/19/24/

      because the team lead needs m/d/yy names with forward slashes

  • Ugurcan@lemmy.world
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    edit-2
    2 days ago

    It’s actually a pretty good idea to have a full system snapshot time to time, where the project can compile successfully, for future Virtual Machine use. It’s usually easier to spin a VM than setting up the whole dev environment from scratch.

  • 0101100101@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    I do miss the tags of SVN that would replace certain strings on each commit such as the date, a version number, etc.