Do you have a story to share?

    • Deebster@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 months ago

      I wish all rules, Ts&Cs, contracts, etc came like this. It might make it less unfeasible to follow what’s changed when something forces you to agree to the new version of the terms.

  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    17
    ·
    9 months ago

    I wanted to automate the setup of my desktop environment, but didn’t know what got changed in the individual config files when I tweaked a setting in the UI.

    So, I did a git init in ~/.config/, added all files to an initial commit, and then made the change in the UI. Afterwards, a git diff showed the exact changes I wanted.

  • RonSijm@programming.dev
    link
    fedilink
    arrow-up
    16
    ·
    9 months ago

    I use it to backup my save games. Not sure if that’s conventional.

    For example, I’d MKLink %appdata%/Local/Pal/Save/ to a folder in my save repo, and commit that every once in a while.

    • 7heo@lemmy.ml
      link
      fedilink
      arrow-up
      8
      ·
      edit-2
      9 months ago

      Fun story, in 2012 I got the idea of making a git based “cloud” save system with branching, to explore multiple story paths in games.

      I implemented the FileSystemWatcher (the equivalent to Linux’s inotify) component in C# on Windows, was able to detect when games were saved, and commit that to git, and stopped there.

      Feel free to implement that, I’d love to save on implementation time 😇

  • cafuneandchill@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    9 months ago

    I used it once for version controlling my master’s when I was writing it. I wrote it in Markdown with Pandoc syntax, so it worked. I eventually gave up and just used LibreOffice, though, since it was a hassle

    • the_third@feddit.de
      link
      fedilink
      arrow-up
      6
      ·
      9 months ago

      We did that all the time in Uni when writing lecture scripts in collaboration with other students. We used LaTeX though. Worked perfectly for us back then.

      • mumblerfish@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        9 months ago

        I worked with LaTeX a lot, but none of my collaborators used git. They just dump the files in dropbox. Still nice to use git just for yourself so you can view changes easily.

        • the_third@feddit.de
          link
          fedilink
          arrow-up
          1
          ·
          9 months ago

          Yeah, I guess studying CS helped there. I had some lectures in mechanical engineering on the side, those students were firmly rooted in Office 365. Explains a lot later in life, looking back.

      • cafuneandchill@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        9 months ago

        Both lol. The reason is that I had to render it to DOCX each time for my PI to review it, because she was an old retrograde woman. Therefore, rendering the document, committing changes and reading Git and Pandoc documentation took time – the time that I could’ve used to write the actual thing

  • Corbin@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 months ago

    I’ve put ASTs directly into git repositories by encoding each leaf as a blob and each tree as a tree. Since git objects are content-addressed, this gives deduplication of ASTs for free, including CSE for sufficiently-pure ASTs.

  • Swordgeek@lemmy.ca
    link
    fedilink
    arrow-up
    3
    ·
    9 months ago

    Not very clever or rare, but extremely useful. On my persistent Unix/Linux boxes, I “git branch /etc” as soon as it comes up. Then all of my admin config gets committed whenever it’s changed.

    • metiulekm@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 months ago

      Have you tried etckeeper? I haven’t, but it’s supposed to be an improvement over just using git in this usecase.

  • xcjs@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    9 months ago

    I tried to take hourly snapshots of an already-large Minecraft world using Git, but after a few years of snapshots, the repository became corrupted.

    One of the issues was that regardless of any player-based changes that occurred, the spawn regions were always different as they were always loaded in memory.

  • madeindjs@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    9 months ago

    I just discovered from So You Think You Know Git - FOSDEM 2024 that you can use Git to generate columns:

    seq 1 24 | git column --mode=column --padding=5
    

    Will render:

    1      3      5      7      9      11     13     15     17     19     21     23
    2      4      6      8      10     12     14     16     18     20     22     24
    

    It can be useful to list files / permissions in a directory in multiples columns

    ls -lah | git column --mode=column --padding=5
    

    (Ok, it’s useless)