Home > Net >  Tried to create a global .gitignore file while following a beginner YT video, but failed
Tried to create a global .gitignore file while following a beginner YT video, but failed

Time:10-13

There is a lot on .gitignore but not specifically to the issue I'm having at the point of creating/editing the file. I executed the git config --global core.excludesfile ~/.gitignore_global locally fine. However when I execute open ~/.gitignore_global it fails saying the file does not exist.

It says the file is not in users/me, however when I do a git config --get core.excludesfile it shows the same path. So this has stumped me...?

Also if I check via finder with hidden files off I can see hidden files but not that one anywhere on my system, let alone users/me.

My intention is to add .DS_Store to the file once I can access it.

I have watched a couple different YT'RS now and they all seem to work fine but don't mention any potential dependencies to function correctly.

CodePudding user response:

However when i execute open ~/.gitignore_global it fails saying the file does not exist

Because it really doesn't exist. That's because you didn't create it.

Telling Git where the file is, is not the same as creating the file. Telling the terminal to open the file, is not the same as creating the file. Looking for the file using the Finder, is not the same as creating the file.

Creating the file is up to you. It isn't going to appear by magic. It isn't going to appear because you talk about it, think about it, or look for it. It's going to appear when you create it. Create it.

  • Related