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?
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
# JetBrains IDE
# Unit test reports
# Generated by MacOS
# Generated by Windows
# Large media files
Please feel free to let me know if you have any questions.
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 ...
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