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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Default ignore file

This might be a bit late. I created an empty repository and prepared an initial commit of all of my files locally. This was then pushed to remote.


At this point I do not have a gitignore file.


The project is Visual Studio for Mac Xamarin Forms.


Is there a suitable gitignore file I can add to my repository? 

1 answer

1 vote

Hi @ChuckieAJ ,

I'll provide you with the default .gitignore file that Bitbucket creates when you create a new repo and select the option to include a .gitignore. Please note though that this should be customised, depending on what exactly you want to ignore in your own project.

If you add a .gitignore now in your existing repository, it will not have any effect on files that you added prior to adding the .gitignore.

If your existing repository still has only the initial commit and no extra commits, what you could do is create a new local repo, add and commit a .gitgnore specific to your project, then add and commit all your files, and push that to a new Bitbucket repo.

If your existing repository has more than one commits and you don't want to lose the history, then you can first rewrite history with a tool like BFG in order to remove from Git history the unwanted files/folders. Push to your Bitbucket repo, and then add a .gitignore file as well.

You can read more on Git ignore patterns you can use in .gitignore here:

An example of a .gitignore file that is added automatically to newly created Bitbucket repos (if the option to include a .gitignore is select) is the following:

# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:

# Node artifact files

# Compiled Java class files

# Compiled Python bytecode

# Log files

# Package files

# Maven

# JetBrains IDE

# Unit test reports

# Generated by MacOS

# Generated by Windows

# Applications

# Large media files

Please feel free to let me know if you have any questions.

Kind regards,

Thanks. I found a bespoke file here for Xamarin .gitignore file.

Like Theodora Boudale likes this

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,570 views 1 9
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