3 ms·
No. You never checkout a site directly from git to begin with. You don't let other people know what files are ignored from git doesn't mean people cannot access
by alvis 4y ago
No. You never checkout a site directly from git to begin with.
You don't let other people know what files are ignored from git doesn't mean people cannot access them. :/
- teknopaul 4y agoNonsense. Everyone uses git for source control, of course you check out a site with git. All you are telling people with a .gitingore is what is _not_ available. It means exactly that people can not access them if your site is a checkout, because they aren't there.
- NateEag 4y agoMany of us have a build process that converts the contents of a checkout into a deployable site (a.k.a. "build artifact"). The build process can trivially skip .gitignore files (and all other files that are strictly for dev environments). You then deploy the build artifact to production, with exactly the set of files which ought to be there.
- noselasd 4y agoThere's cases where you don't need a build process for a site.
- NateEag 4y agoSure. In those cases a build process is usually trivially easy to put together, and has benefits, so while not necessary it's still beneficial.
- TheHappyOddish 4y agoWhilst that's _sometimes_ true, there are plenty of cases where there's no additional value compared to just dragging the file into your FTP client.
- jahsome 4y agoNope. Paths in .gitignore means git ignores them. Doesn't mean the file doesn't exist. It means it's not in source control. An example is a .env file. It may very well be _required_ in many PHP or node projects but it's going to be ignored.
- musk_micropenis 4y agoIt doesn't even mean it's not in source control. It just means that IF it's not in source control it won't be added to a change set automatically. gitignore has no effect on files which are already tracked, and even files which are not currently tracked can be explicitly added.
- jahsome 4y agoGreat point!