gitignore icon indicating copy to clipboard operation
gitignore copied to clipboard

Add .gitignore for C Sharp

Open suhaibjanjua opened this issue 1 year ago • 6 comments

I just added a .gitignore file made especially for C# projects. It's there to make sure we don't end up including unnecessary files and folders in our version control.

suhaibjanjua avatar Apr 07 '24 11:04 suhaibjanjua

I'm sad to see this is probably never gonna get committed. Even tho, it was truly helpful for me to ignore files I wasn't aware I should ignore, as a beginner in C#. Thank you very much for your .gitignore!

madebylydia avatar Apr 20 '24 07:04 madebylydia

👋 Hi @suhaibjanjua, this is primarily covering what is already in our VisualStudio template.

Could you please look at that ignore file and consider extending it if needed?

wirecat avatar May 29 '24 01:05 wirecat

@wirecat The problem is when people search for a C# gitignore template here, there is none. Better to be redundant than not have a repo for C#

MattPlum avatar Jun 03 '24 19:06 MattPlum

@wirecat The problem is when people search for a C# gitignore template here, there is none. Better to be redundant than not have a repo for C#

If we were to include it, this is very targeted at Visual Studio currently, but there are a growing number of developers working with C# using other IDEs.

wirecat avatar Jun 03 '24 20:06 wirecat

The template for Visual Studio is too general, so we should be more specific with C#, despite I personally think ".NET / C#" would be better naming, but consider that Kotlin also have its own gitignore option while it is not called "JVM / Kotlin" in retrospect.

stevefan1999-personal avatar Jun 23 '24 14:06 stevefan1999-personal

Realistically the visualstudio.gitignore needs to start versioning. VS2022 gets rid of a lot of crap that the current gitignore file includes that ignores old <VS2022 stuff. Granted people are still using VS2019. I dont believe they (and I wouldnt myself) expect visualstudio.gitignore to always work well for them.

VisualStudio brings big enough changes iwth new versions that IMO there SHOULD BE separate gitignores for it. visualstudio.gitignore really should be visualstudio-latest.gitignore and have a visualstudio-2022.gitignore and a vistualstudio-2019.gitignore and so on.

In regards to this pull request, I dont believe we need a "C#" specific gitignore, because VisualStudio isn't C# specific.

ericnewton76 avatar Jul 03 '24 17:07 ericnewton76

@suhaibjanjua AI haven't heard from you in response to my questions. I'm going to close this one for now as it isn't something we want to merge down as-is.

Thank you for contributing and I encourage you to look into more generic C# ignore rules we might accept.

wirecat avatar Sep 09 '24 21:09 wirecat