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

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

AfrozBasha Arab October 21, 2019

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

0 votes
AfrozBasha Arab October 22, 2019

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.

Abdulkarim Itani October 22, 2019

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

0 votes
Abdulkarim Itani October 22, 2019

These conditions are what you are looking for

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events