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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • 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

config file already in repository, want to restrict it in future push to repository Edited

Hi,

we already have a config file in our repository, we want it to be removed and restrict it from being pushed to repository in future. so want to have a pre-commit hook, which can restrict it. For info we have the Adaptive scriptrunner installed inour Bitbucket

thank you

Afroz

2 answers

Thank you @Abdulkarim Itani  what you gave was nice, I have already gone throught that, but it does not meet my requirement.I am looking for a restriction on a specific file which should be removed from repository and restricted in future commits/push.

The condition mentioned here

https://scriptrunner.adaptavist.com/5.0.0/bitbucket/#_pathsmatcher

can be configured to restrict a single file from being pushed in any commits.

If you want to remove this configuration file from the repository and eliminate its automatic addition in any future cases, you can add the file name in git ignore. 

Please see the below link for gitignore

https://git-scm.com/docs/gitignore

Suggest an answer

Log in or Sign up to answer
TAGS
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 ...

1,897 views 0 7
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