.gitignore is not ingoring bitbucket-pipelines.yml

I added bitbucket-pipelines.yml line to .gitignore file before creating the actual bitbucket-pipelines.yml file on the remote repo. Yet, when I try to push changes from my local project to the remote, git asks me to pull this file to local project first. So why isn't it being ignored?

1 answer

0 vote

Hi! If the bitbucket-pipelines.yml was not tracked previous to the addition to the .gitignore, it should be completely ignored. Can you share your .gitignore file with us in case we find something wrong?

Cheers!

Ana

Hi. Thank you for the reply. Yes, it was untracked prior to the creation of the file. Here's the contents of my .gitignore file. The same file I have both at local and remote repos:

/database/database.sqlite*
/public/images
/node_modules
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
.env.*
.git-ftp-ignore
sftp-config.json
bitbucket-pipelines.yml

It looks like it is tracked in bitbucket, not in my local repo, because when I delete it from local, there are no changes in git status, but when I try to push other changes to remote, it says that there are mismatch on remote, so I have to pull first, which I think bitbucket tells my local git that there's a mismatch, even though the same .gitignore file containing bitbucket-piplienes.yml entry is located on remote repo as well.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

29,438 views 26 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you