📜  gitignore dotnet mvc - Shell-Bash (1)

📅  最后修改于: 2023-12-03 14:41:30.948000             🧑  作者: Mango

gitignore for .NET MVC projects - Shell/Bash

If you're working with .NET MVC projects, you might have files and folders that are generated by the build process or IDE and don't need to be committed to version control. In this case, it's a good idea to use a .gitignore file to tell Git which files to ignore.

Here's a sample .gitignore file that you can use for .NET MVC projects:

# build artifacts
bin/
obj/

# Visual Studio files
.vs/
*.suo
*.user
*.ncrunch*
*.csproj.user

# NuGet packages
packages/

# .NET Core files
project.lock.json
project.json.lock
*.nuget.props
*.nuget.targets

# misc
[Tt]humbs.db
*.DS_Store

This file includes several patterns that exclude:

  • bin/ and obj/: directories where build artifacts are stored
  • .vs/, *.suo, *.user, and *.ncrunch*: files that are generated by Visual Studio
  • packages/: NuGet packages that are downloaded automatically during the build process
  • project.lock.json, project.json.lock, *.nuget.props, and *.nuget.targets: files that are generated by the .NET Core CLI
  • [Tt]humbs.db and *.DS_Store: macOS-specific files that can be safely ignored

By using this .gitignore file, you can ensure that you're only committing the essential files to your repository, which can help keep it organized and easier to manage.

If you need to add other files or directories to this list, you can simply add them to the .gitignore file by appending them on a new line.

Happy coding!