News for hackers. Stuff that matters.
Re:Git Commands You Probably Do Not Need by Arnavion on Monday January 23, 2023 @10:43AM (#34490117)
re: using `git commit --allow-empty` for initializing new repositories - I used to do that for the same reason (being able to rebase), but eventually I started checking in a LICENSE file and skeleton README.md file (name of project + LICENSE blurb) as the first commit instead.
Re:Git Commands You Probably Do Not Need by myme on Monday January 23, 2023 @10:49AM (#34490221)
Don't get me wrong, I'd say that's a very good approach too. A lot of my personal repos are private and synced through personal infrastructure so I don't always bother with those kind of files.
Re:Git Commands You Probably Do Not Need by mst on Monday January 23, 2023 @11:38AM (#34491093)
I habitually start with 'touch .gitignore' and then committing that.

Since an empty .gitignore doesn't actually do anything and has never been an issue to rebase onto, it works out fine for me.

I should probably, arguably, switch to using --allow-empty but my current workflow is long since baked into my fingers and has yet to cause a problem for me or anybody else, so if I switch it'll be for reasons of pure pedantry (which me being me may eventually be quite sufficient motivation, but hasn't just yet).