Can be .gitignore file be used only in GitHub Repo?

161 Views Asked by At

I am creating a React App and my superior would want the app to be hosted anywhere but not on GitHub, so I recommended Hostinger. My question is: Can I add a .gitignore file in Hostinger, or any other hosting service that is not GitHub?

1

There are 1 best solutions below

1
fedev On

GitHub and Hostinger are not the same services. GitHub is a git-based code hosting platform for keeping your repository, version control, and collaboration like GitLab and BitBucket. But Hostinger is not a git platform, provides you web hosting services.

You can add .gitignore file all of your git repos (read documentation: https://git-scm.com/docs/gitignore)

If you want to hide your some files during the file transfer process from your computer to Hostinger, then .gitignore is not for your purpose. Because the .gitignore file was created for the git system and its existence is considered by git.

If you make your project a git repository and add a .gitignore file, not only GitHub, but all git platforms such as GitLab, BitBucket, or other private git platforms will already check for it.