In Dotnet's project, the compiled binaries are placed by default in the bin and obj directories for each project, and sometimes developers accidentally commit the files of those directories to the GIT server by mistake. The Ignore file feature in Git can be very good to avoid this situation through a. gitignore file.
For example, I do not want all directories (including subdirectories) in the Obj,bin folder and. user,.suo files to be synced to the GIT server, put the following. Gitignore in the root directory to meet this need
# Compiled filesobjbin# user Files.user.suo
Update: It happened today that GitHub already has an official Gitignore file for the Visual Studio project, which can be submitted directly to the project root directory.
# # Ignore Visual Studio temporary files, build results, and## files generated by popular Visual Studio add-ons.# User-spec Ific files*.suo*.user*.userosscache*.sln.docstates# user-specific files (monodevelop/xamarin Studio) *.userprefs# Build results[dd]ebug/[dd]ebugpublic/[rr]elease/[rr]eleases/x64/x86/bld/[bb]in/[oo]bj/[ll]og/# Visual Studio 2015 Cache/options directory.vs/# Uncomment if you are having tasks that create the
Let git ignore the synchronization of all obj and bin directories