By default git will prompt all files and folders to be tracked; however, in our projects we may have temporary files or installed packages which usually we don't save them in our repository. Also there is high chance our project uses some files with sensitive information such as credentials so it is a good practice to exclude them from our repository because repositories may be shared and usually stored on the cloud. To do so, we need to create a nameless file with .gitignore extention. Git will exclude any file and folder name is mentioned in the file. It is a text file which each name is stored in one line. We can use wildcards to exclude a range of files. Here is a sample .gitignore file content but you can modify it as you wish:
*.temp
*.tmp
*.bak
/node_modules
/build
.DS_Store
npm-debug.log*
/original/*
**/bin/Debug/
**/bin/*
** refers to any level of subfolders
/ at the end of directory name means exclude all subdirectories but keep folder content