When you want to hide stuff from git you want to place it in a “.gitingnore” file.

Here is mine for C# development.

*resharper.user
# Visual Studio
[Dd]ebug/
[Rr]elease/
*.sln.cache
*.suo
*.csproj.user# Resharper
*[Rr]e[Ss]harper.user
_ReSharper.*/

#VSS files
*.scc

#Testing products
[Tt]est[Rr]esults

#Upgraded solutions
_UpgradeReport_Files/

#unwanted files
*.dll
*.exe
*.pdb
*.lnk
*.zip