You are reading the documentation for version 2.2. Magento 2.3 is the latest version available. Ensure you are reading the documentation for your version of Magento.

.gitignore reference

We include a base .gitignore file with the Magento Open Source project repository. See the latest Magento .gitignore file. If you need to add a file that is in the .gitignore list, you can use the -f (force) option when staging a commit:

1
git add <path/filename> -f