Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way to change the default .gitignore file?

Eric Paul May 12, 2022

The default .gitignore does not work for .net projects. Is there a way to change the default file so it creates something more appropriate?

We're switching from Azure to the Atlassian stack and I have to say it feels like Microsoft is a second or third class citizen. This is a small thing because I know I can always add my own but when your used to being able to pick from a list of .gitignore files (based on programming language) it's a downgrade when you don't have that feature. 

1 answer

1 accepted

0 votes
Answer accepted
Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2022

Hi @Eric Paul welcome to the community.

I'm trying to understand your requirement a bit better.
The .gitignore file is git specific and not server specific and lives at the root of the repository, unless someone has intentionally created a Global Git Ignore Rule... you should be able to edit it and commit it back to the repo.  You can also define .gitignore rules for individual directories within the repo.

Have a look at this page.

.gitignore 

Eric Paul May 12, 2022

Thanks for your reply.

When I create a project in bitbucket there is an option to add a .gitignore file.
I want that file to be one that is appropriate to a .Net project--not python or whatever the current default is.

Like # people like this
Eric Paul May 12, 2022

AddingGitignoreInAzureDevops.JPG

This is what it looks like when you add a .gitignore file to a project in AzureDevops. It's "Language/Platform specific"

Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2022

Ya, I went looking to see for you ... There's nothing but an old feature request even in the developer site.  Sorry man.  Maybe vote up on the request or submit a new one it was really old.
I hate giving folks these kind of answers ... ugghhh
I wonder if you set the .gitignore globally with the settings you want included if it would modify the default....

Eric Paul May 12, 2022

Yeah a global gitignore will probably work, but now I'm going to have to write up a set of instructions for all of the devs (setting the global gitignore file from visual studio is not supported) before the instruction was just "Select the most appropriate .gitignore file when you create the project". Now it will be a procedure to set it up.

Given that Visual Studio is one of the most popular IDE's I'm just surprised not to see more/better integration. Guess I'm a bit spoiled by the tools provided by Azure Devops and AWS. Atlassian should go find the person who wrote the Visual Studio extension for BitBucket and just hire them.

Like Craig Nodwell likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events