Live data from Hacker News

.gitignore Isn't the only way to ignore files in Git

nelson.cloud

181–188 of 188 posts

Re: .gitignore Isn't the only way to ignore files in Git

#182
post #11

Earlier quoted context omitted.

Usually when I'm working in one part of the codebase and I have sample data or something at a specific path on my local machine and Im testing the same thing over and over again will I make a Makefile or something and info/exclude it to help me keep focused. That's one way I use it.

I use git worktrees pretty heavily in my own workflows (I worked like an AI agent before AI agents made worktrees cool). I like to track my ephemera/utility scripts in git, so what I do is keep a private ephemera repo for those, and then use `git worktree add` from the collaborative repo to check out the branch I'm working on there into a subdirectory of my ephemera repo. git-home/ company-project/ This way, too, I c…

Oh this is really clever, I'll have to try this. Thank you :)

Re: .gitignore Isn't the only way to ignore files in Git

#183
post #78

Earlier quoted context omitted.

You may need to have certain directories be excluded depending on the programs you use. For example, the default Chrome profile location is within ~/.config, which includes cache data that can be multiple gigabytes in size.

Ouch. It doesn't respect `$XDG_CACHE_HOME`?

Browsers are some of the most annoyingly configured applications out there.

Re: .gitignore Isn't the only way to ignore files in Git

#184
post #152

Here's how I use the excludes file to set a different config for a project directory containing multiple repos: https://laszlo.nu/blog/project-level-git-config.html

I *literally* cannot read that yellow text on the white background. I even tried changing the brightness to almost 0, but there is just not enough contrast.

Fixed now, thanks again for your feedback!

Re: .gitignore Isn't the only way to ignore files in Git

#186
post #167
post #107

Earlier quoted context omitted.

Python packages aren't quite so insane on transitive dependencies. The diff of package-lock.json can be novel length.

write your requirement.txt files via pipdeptree --freeze to see this clearly

FYI the uv equivalent is

    uv pip tree

Re: .gitignore Isn't the only way to ignore files in Git

#187
post #11

Earlier quoted context omitted.

Usually when I'm working in one part of the codebase and I have sample data or something at a specific path on my local machine and Im testing the same thing over and over again will I make a Makefile or something and info/exclude it to help me keep focused. That's one way I use it.

I use git worktrees pretty heavily in my own workflows (I worked like an AI agent before AI agents made worktrees cool). I like to track my ephemera/utility scripts in git, so what I do is keep a private ephemera repo for those, and then use `git worktree add` from the collaborative repo to check out the branch I'm working on there into a subdirectory of my ephemera repo. git-home/ company-project/ This way, too, I c…

How do you manage the lifecycle of the worktrees in practice? Is it mostly manual git worktree add/remove, or do you use aliases/scripts/some other tools?
Post reply on HN