kangalio/launchy

Add gitignore file

belak opened this issue · 3 comments

belak commented

I switch between a number of editors, but one of them is VSCode which attempts to watch all non-ignored files for changes. Without a .gitignore, this includes all the files in the target directory, so it watches all dependency files for changes as well. Additionally, tools like rg use the gitignore to ignore what files to search, otherwise I continuously find results when looking for text in target/rls/debug/deps/save-analysis/launchy-b1e0490dd979d0b7.json.

Would it be possible to add a basic .gitignore so at least the target directory (and hopefully Cargo.lock) can be ignored? These are files which should never be committed to the repo, so it makes sense to have them be gitignored.

I'm opening this issue to start the discussion since when I accidentally added it in the Launchpad Mini PR, you ended up reverting that change in your lp-mini branch, so I assume you have a reason for not wanting to have one.

Sorry for removing the .gitignore file with no comment

I agree that .gitignore is invaluable. However I like to put personal junk files into .gitignore as well so that they don't litter the VSCode git file list. I don't want to commit the list of personal junk files to github though, because it changes every so often and it's also not relevant to others. That's why I usually put .gitignore into .gitignore itself

If you know a better solution, I'd be glad to hear :)

belak commented

Interesting, I've never seen that sort of workflow before. What sorts of personal junk files do you end up adding?

If you keep them named similarly in all repos, one trick I've used before is adding a global gitignore.

That page also has an interesting section I didn't know about on excluding local files without creating a .gitignore file. I wonder if that would work for you.

What sorts of personal junk files do you end up adding?

Here's a commented version of cat */.gitignore | sort -u if you're interested :) https://pastebin.com/xeyCS9Cr

That page also has an interesting section I didn't know about on excluding local files without creating a .gitignore file. I wonder if that would work for you.

That looks very interesting indeed, I haven't ever seen that before either. But it looks like it's exactly intended for the workflow I'm using, according to a StackOverflow answer (link). Thank you for that, I shall use that instead of .gitignore and see how it goes :D