Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I get rid of the default .gitignore?

An option flashed by me that I didn't uncheck, and now my repositories are created with a default .gitignore that prevents normal operation. I can't check in a new repo because the "histories are unrelated".

How do I shut off that "feature" of generating the default .gitignore (which doesn't have anything in it that I need). 

How can I get passed this problem checking in my source?

And not so important, but .. why doesn't search turn up anything about it?



2 answers

1 accepted

1 vote
Answer accepted

Found how to delete a file, but had to delete the repo, then recreate it choosing not to include a .gitignore -- which should not be "recommended" as it is particular to the project -- and got things working.

A default .gitignore is not helpful, in my view.  It instantly puts your repo you're trying to set up at odds with the bitbucket. Even if the contents of .gitignore were exactly what you needed, you are instantly out of sync with the bitbucket version of the repo from what you have locally.

Just don't see how that helps. How do you actually take advantage of it?


I agree. I hate it when tech companies think the're helping you, but actually make your life more difficult.

Like # people like this

Steps to dealing with this incredibly intrusive addition without deleting the repo...


1) Manually delete it from the BB repo page (go to the file page, three dots, 'Delete') and commit

2) From your local terminal, git pull origin master --allow-unrelated-histories

3) Push as normal, git push -u origin master

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

218 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you