You are not logged in.
I have a git repo with man pages written in markdown. I use a script to generate nroff man pages from those files that I would like to include in the exported archive, but I do not want to track them with Git because it would be redundant, and I only really need them in the archive.
What is the best way to include them?
I'm still a Git noob, so maybe I'm thinking about this the wrong way. I wish there was an "export-include" option for .gitattributes. So far it seems that I might be able to do this with the filter option using custom clean and smudge commands, but that would probably be a dirty hack.
Any ideas?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Don't ship them and just generate them at build/install time?
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
@Mr.Elendig
That's not an option because the conversion requires pandoc and making that a build dependency would be unreasonable in this case.
@falconindy
If I have understood that correctly, it's appending the archives to the exported archive. I will do it that way if there truly is no way to do it directly with Git.
Thanks for the replies.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Might it be easier to directly use tar or gzip? For example,
tar --exclude-vcs --czvf your_project-X.Y.Z.tgz your_project
If your project directory contains additional files that you don't want in the package, you could explicitly filter those out using the --exclude option.
Autoconf/Automake can also be used to create dist packages (archives). I seem to recall that it allowed one to specify additional "data" to be included with the source.
- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer
Offline
@bsilbaugh
That's basically what I do with untracked projects. I don't want to do that with Git because this really is what Git archive is supposed to do (imo). The .gitignore file already tracks exclusions. Keeping that information in two places or writing a git-to-tar parser to extract it would just lead to unnecessary duplication and maintenance complexity.
So far I think I'll just use a script to append the desired file to the archive after export. When I get some time I may try to add an "archive-include" option to git.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline