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:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore
# Node artifact files
node_modules/
dist/
# Compiled Java class files
*.class
# Compiled Python bytecode
*.py[cod]
# Log files
*.log
# Package files
*.jar
# Maven
target/
dist/
# JetBrains IDE
.idea/
# Unit test reports
TEST*.xml
# Generated by MacOS
.DS_Store
# Generated by Windows
Thumbs.db
# Applications
*.app
*.exe
*.war
# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv
Please feel free to let me know if you have any questions.
Kind regards,
Theodora
Thanks. I found a bespoke file here for Xamarin .gitignore file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.