50

Do you have a story to share?

all 26 comments
sorted by: hot top controversial new old
[-] rudyharrelson@kbin.social 78 points 11 months ago

A couple of years ago, I was modding a fresh install of Skyrim and thought, "I can use git branches to make it easy to switch between different mod combinations rather than uninstalling/reinstalling mods when something breaks or when I want to change things up." Worked well!

I had branches that were mostly vanilla with enhancements, and then branches that had all kinds of ridiculous mods. If I wanted to switch to playing a ridiculous build of Skyrim, I'd just close the game, checkout the branch I wanted, and start the game.

[-] Feathercrown@lemmy.world 4 points 11 months ago

This one wins

[-] folkrav@lemmy.ca 3 points 11 months ago

Interesting! Didn’t slow up too much with all the binary files? I guess you weren’t swapping around sets of 300 content mods either lol

[-] rudyharrelson@kbin.social 1 points 10 months ago

It's been a couple of years, but I don't recall it being particularly slow switching between branches. I had a pretty beefy rig to begin with, which probably helped.

[-] gitamar@feddit.de 20 points 11 months ago* (last edited 11 months ago)

There's a gut repo of the German constitution (Grundgesetz) with all changes with correct dates and authors:

https://github.com/c3e/grundgesetz

And it exists for all laws in Germany, too: https://bundestag.github.io/gesetze/

Created/funded by a government sponsored fund for open source software

[-] Deebster@programming.dev 2 points 10 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.

[-] RonSijm@programming.dev 20 points 11 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 8 points 11 months ago* (last edited 11 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 😇

[-] Ephera@lemmy.ml 18 points 11 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.

[-] Zachariah@lemmy.world 17 points 11 months ago
[-] orhtej2@eviltoast.org 14 points 11 months ago
[-] canpolat@programming.dev 12 points 11 months ago

The URL seems to have a typo. Correct URL is https://github.com/presslabs/gitfs

[-] cafuneandchill@lemmy.world 8 points 11 months ago* (last edited 11 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

[-] zygo_histo_morpheus@programming.dev 4 points 11 months ago

Was it the version controlling or writing in markdown part that was a hassle?

[-] cafuneandchill@lemmy.world 2 points 11 months ago* (last edited 11 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

[-] shnizmuffin@lemmy.inbutts.lol 6 points 11 months ago

Tracking season-by-season changes to my fantasy football league's charter.

Business logic mermaid diagrams installed as a submodule in every projects repo.

[-] atomkarinca@lemmygrad.ml 4 points 11 months ago

ifc-git.

ifc is an iso standard for 3d construction projects, which includes all aspects of a building data. because ifc is in human-readable form, versions of the same project can be diffed, hence ifc git.

this is a really underappreciated project.

[-] Corbin@programming.dev 4 points 11 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 3 points 11 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 3 points 11 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 3 points 11 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 2 points 10 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)

this post was submitted on 11 Feb 2024
50 points (98.1% liked)

Git

2944 readers
3 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 2 years ago
MODERATORS