(no title)
videlov | 1 year ago
It has happened to me in the past to wonder why certain files/folders are ignored by git, only to realise that I had a global git ignore for the particular pattern.
Not sure l’d recommend this as a good default, but perhaps others have better memory than I do.
zaptheimpaler|1 year ago
There's also `git status --ignored` to check if you're missing anything.
codetrotter|1 year ago
And also, sometimes I work from different machines and I don’t really want to have yet another dotfile to sync between all my current and future machines.
(Yes, I know dotfile managers exist, but I literally only care about syncing my zsh config files and one or two other dotfiles mainly so I do that with my own little shell script and basically don’t care about syncing other dotfiles.)
dkarl|1 year ago
idle_zealot|1 year ago
kyleee|1 year ago
edoceo|1 year ago
Just a view from the other end of the spectrum.
g4zj|1 year ago
MrJohz|1 year ago
The project-specific file is for stuff that should be shared amongst all users of a particular project. So for a Node project you might have `node_modules` in there, for a Python project you might have `.venv` and `*.pyc`. If your project uses env files, you might have a line like `.env` in there for that.
Meanwhile, the global gitignore is for stuff that's specific to your system. If you're on MacOS, you might have an entire for `.DS_Store`, or if you use Vim a lot you might have an entry for `*~` files (i.e. vim backup files). This is stuff that's specific to you.
Git can then combine the project-specific ignores (located in the project respiratory) and your user-specific ignores (located in your global gitignore file), and ignores anything that matches either case.
Vinnl|1 year ago
tomjakubowski|1 year ago
jcalvinowens|1 year ago
tremon|1 year ago
isaacremuant|1 year ago
DEADB17|1 year ago
npteljes|1 year ago