I know it depends on the project but i want to learn is there a common practice for typical asp.net core project(such as ignoring node_modules).
node_modules
In Visual Studio 2019, pressing this button (in the lower-right) generates a nice .gitignore file for you:
.gitignore
Here is the file you get: https://github.com/github/gitignore/blob/master/VisualStudio.gitignore