Follow-up question: I maintain my Homer configuration in a Git repository, and the assets are deployed to the server via a CD/CI pipeline. Does anyone have any suggestions on how I can include the 'theme' file from the other repository in a useful way? I have no experience with subtree/subbranch, but I think it might be useful here. Should I start looking into it?

#git #subtree #subbranch #Homer #SelfHost #HomeLab

So what's the smoothest way these days to integrate localisation repositories into your git repo?

As a background: our localisation needs to live in a separate git repo that is monitored and also updated with new translations by pootle (a translation tool) but we also want to be able to pull out the generated PO files as well as push local updates (and new texts) from within the containing project repo the localisations belong to. So merges / rebates are kinda required.

Git submodules are the worst case here as you can't really commit / push local updates to the translations back to the localisation repo without making a separate checkout, doing your changes there, then pushing to your remote and finally updating the reference for your local submodule and pulling again.

Git subtrees sounded like a good idea but they way they're implemented makes them nasty to use as well.. they tend to break if you work with pull --rebase in the containing repo and merge conflicts in the sub tree can't be resolved with a sub tree-rebase either.

In the past I used to have the localisation as a full git checkout in a sub directory of the containing project and maintained it using a few CMake scripts but I had hoped there's be something smoother by now.

#git #submodules #subtree #localisation #i18 #workflows #question #SofwareDevelopment #boostswelcome

(My personal #git #subtree sage continued)

Boy howdy upon doing a diff -r between my git_dotfiles and personal kickstart.nvim fork to see if any changes 'leaked' via the subtree usage pattern issue I detailed about: I found a bunch.

5 files with a bunch of delta between them.

Glad I caught this while it's at least still human scale managable. For complex repos run by teams, this could turn into a H-E-A-D-A-C-H-E right quick.

An IMO very dangerous thing I just learned about using #git #subtree:
It doesn't give you any indication that you've done this if you modified your subtree vendored repo contents inside your parent repo, and your changes only go to the parent repo, not the one you're trying to vendor.
11:41
I was worried about this and checked and, bleah. The smoking gun:
Changes I just made to the subtree'd files checked out in the parent repo:
https://github.com/feoh/git_dotfiles/blob/main/.config/nvim/ftplugin/markdown.lua
The original 'vendored' upstream repo I was trying to include:
https://github.com/feoh/kickstart.nvim/blob/master/ftplugin/markdown.lua
So, you can see that had I not caught this, I might never know that the changes only exist in my git_dotfiles repo and NOT my kickstart.nvim one where I'd expect. Dunno if it's possible to prevent this, but clearly regular sweeps to check for leaked changes and increased discipline to ensure I don't botch like this are in order.
git_dotfiles/.config/nvim/ftplugin/markdown.lua at main · feoh/git_dotfiles

Using a git repo in my homedir to stow my dotfiles - feoh/git_dotfiles

GitHub

In #git is there any way to use a strategy like "-X theirs" when pulling a #subtree?

I'm encountering weird merge issues when pulling a subtree, and I'd like to be able to tell git just to force using the remote subtree source, rather than trying to merge theirs with what's currently in my top-level repo.

I've tried adding the `-X theirs` in various places within my `git subtree pull` command, and it just keeps telling me the syntax is incorrect.

Today I learned the usefulness of #git #subtree. It wasn't completely necessary, "git filter-branch" could achieve the same results by other means, but subtree just made it so much easier.

I've broken up my #COPR's cloud-native-utilities repo into their own distinct repos on #Pagure. The process was actually pretty straightfoward!

General overview since I'll run out of characters here:

https://paste.sr.ht/~omenos/46140c3432919c8dc74cb3fb255c67c5ed2b1a73

So this:

https://pagure.io/mroche/cloud-utilities

Has become:

https://pagure.io/group/mroche-cloud

TIL about git-subtree, which is a nice alternative to git modules (a source of much misery for me).

git-subtree lets you take one repository and merge it into another under a specified pathname (adjusting all the commits on the fly), OR take all the changes under a specified path (excluding parts that touched things outside of that path) and generating a set of commits which could be pushed into another repository.

https://manpages.debian.org/bullseye/git-man/git-subtree.1.en.html

#git #dvcs #til #subtree

git-subtree(1) — git-man — Debian bullseye — Debian Manpages