• tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    30
    ·
    11 months 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
    
  • mEEGal@lemmy.world
    link
    fedilink
    arrow-up
    13
    arrow-down
    2
    ·
    11 months ago

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

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      14
      ·
      11 months 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
        ·
        11 months ago

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

        • frezik@midwest.social
          link
          fedilink
          arrow-up
          2
          ·
          11 months 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.

  • Ugurcan@lemmy.world
    link
    fedilink
    arrow-up
    8
    arrow-down
    2
    ·
    11 months 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.

    • nogooduser@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      11 months 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.

      • Alphare@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        11 months 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!

  • yogsototh@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    10 months 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
    
  • 0101100101@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    11 months ago

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

      • nogooduser@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        The only reason that we stopped using Mercurial is that Microsoft used Git in Azure DevOps. I still wish that they’d supported Mercurial instead of or as well as Git.

    • nogooduser@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 months ago

      I really liked Mercurial too. It was much easier to follow branches to find out if a branch included a commit.

  • Jade@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months 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.