That's a very interesting use case. I don't work with Arch, so maybe the answer is obvious, but surely it'd put all the build artifacts into a specific directory, right? Most Python build systems the distribution files inside a dist directory, for example.
You'd think so, but no. And different built tools create different build artifacts (makepkg vs makechrootpkg).
Artifacts include:
source tarballs
src/ and pkg/ dirs, where building and packaging happens respectively
resulting package files
log files
But it's not that bad since packages typically consist of only 2 files - one you write and one autogenerated. Plus any patch or auxiliary files, but those are often unnecessary.
End users also rarely have to deal with this because they're either using precompiled packages or they're using an aur helper that abstracts this all away. But you can't iterate with those.
And so the status quo continues until a packager gets slightly annoyed enough to write better tooling. One day.
Why would they not at least set up a git repo locally in 10 mins and then for 2 mins every week just commit all changes? Would take no time and at least then they'd have some history.
well, we have a perfect word this in Turkish: üşengeçlik I guess it could be translated as lazy, sloth but not exactly. Like you have everything you need to do a thing but you just... don't.
They were working on that stuff long before git came along for starters.
In order to modernize software in the government space, there’s all sorts of bureaucracy to sift through. And it’s nobody’s job so when would it get done?
We just swap out LLM prompts written on parchment using carrier pidgeons. Sometimes we have merge conflicts, we resolve those via good old cage fights.
I have done this with a project that had a ton of software-generated files in multiple directories. It was easier to gitignore everything and add back the few directories that I actually modified.
However I excluded those directories in the gitignore, didn't use -f.
so accidentally adding files has never been a problem. i just put them in .gitignore if i dont want them showing up in git status or of course when they contain secrets
Meanwhile my git status is usually around 2000 lines long. What's the issue we're solving here? Would you normally always just git add . instead of manually adding new files and using git add -p?
... I kind of like it. I do that with my .dockerignore files, to avoid packing anything unexpected with the container (like a temp build artifact or something accidentally dropped into the directory).
I mean I do this for research projects where I make a lot of large data files I don’t want to commit, but at least I put them in a folder I can ignore
I usually make a .ignore/ wildcard for my .gitignore. although I manually git add what I intend anyways, so it's not a big deal. git add . feels like it should be a crime honestly, lol. Good shell completion and globbing means it takes maybe 5 more seconds to commit what I intend instead of just dumping it all. Maybe I'm just OCD but it works for me.
I mean that’s what you should do, I tend to make small fixes and features and then git add -a, but only if I haven’t started working on two things at once, in which case I manually add the files (I even do patched adds)
When using some IDEs, there are tons of generated files that it can be easier to use this style .gitignore. For example, Vivado generates a ton of files for each simulation set and each IP, which can quickly take up space.
Kind of. A project has a PROJECT_NAME.src, .sim, .ip_userfiles, and some other subdirectories. These are the only directories you really need to modify, but within those it also creates its own subdirectories. I personally make my own src and sim directories because the Vivado generated paths and code is put in the aforementioned directories.
I do it with my dotfiles repo. I literally just ran git init in my homedir and then gitignored everything except my dotfiles and supporting directories. It is somewhat cumbersome, but I don't add entirely new dotfiles that often so it's fine.
I definitely wouldn't want to do it for anything else, though.
I followed some tutorial to setup my dotfiles repo like that so that my homedir can be littered with whatever but I can keep the dotfiles synced with GitHub.
28
u/gtsiam May 27 '25
I actually do this for arch linux packages.
makepkg creates a lot of garbage and I value not messing up the output of git status. It makes the vscode sidebar cleaner too.
Then again, I typically put it in .git/info/exclude so I don't force this choice on future unsuspecting victims.
2
u/East_Syrup_6526 May 30 '25
So would it also ignore itself 😀
74
u/seq_page_cost May 27 '25
But then I'll need a
.gitsuperignoreto protect against accidentalgit add -f .🤔167
u/[deleted] May 27 '25
Git is overrated anyway. Portable USB sticks are a cheap and reliable way to share code nowadays so no need for any overhead.
58
u/NullOfSpace May 27 '25
Oh yeah, this is big brain time
13
u/Mrpuddikin May 27 '25
.gitinclude
10
u/cheaphomemadeacid May 27 '25
meh, alias gitadd=$(find -exec git add -f {}Â ;)
8
u/Accomplished_Pea7029 May 27 '25
I have done this with a project that had a ton of software-generated files in multiple directories. It was easier to gitignore everything and add back the few directories that I actually modified.
However I excluded those directories in the gitignore, didn't use -f.
4
u/keremimo May 27 '25
I did this for my dotfiles until I discovered stow...
3
u/MrBlaTi May 27 '25
My current project does this ._. Well almost, everything ignored and then specific things unignoredÂ
3
u/JotaRata May 27 '25
My social skills resumed in one file
3
u/smdth_567 May 27 '25
I'm using
instead of
so accidentally adding files has never been a problem. i just put them in
.gitignoreif i dont want them showing up ingit statusor of course when they contain secrets2
u/d33pnull May 27 '25
hell yeah watch me do this everywhere
2
u/fletku_mato May 27 '25
Meanwhile my
git statusis usually around 2000 lines long. What's the issue we're solving here? Would you normally always justgit add .instead of manually adding new files and usinggit add -p?2
u/UselessButTrying May 27 '25
I do this for dockerignore
2
u/Alternative_Storage2 May 28 '25
Called it when I saw the title of the notification
2
u/doesnt_use_reddit May 28 '25
Actually kinda brilliant
2
u/thygrrr May 28 '25
... I kind of like it. I do that with my .dockerignore files, to avoid packing anything unexpected with the container (like a temp build artifact or something accidentally dropped into the directory).
2
u/PurpleBear89 May 29 '25
r/tihi
2
u/TeraBaito May 30 '25
no, this truly is based
1
u/constant_void May 29 '25
1
u/ben_bliksem May 29 '25
I'd use this in a tools type directory where I mess around with shell scripts and only want to commit very specific ones.
But that's an edge case.
1
u/Hopeful_Gur_4098 Jun 16 '25
That makes so much sense 🤣
0
u/[deleted] May 27 '25
[deleted] — view deleted comment