Lucas Young wants to exclude the .git folder when syncing the workdir to a server. Adding .git to .gitignore causes problems, so Zongheng Yang suggests adding .git to .git/info/exclude. Lucas Young later confirms that excluding .git doesn't cause any issues with git.
Lucas Young
Asked on Feb 27, 2024
.git
to .git/info/exclude
.Example:
echo '.git' >> .git/info/exclude