Unable to push the changes after running bfg repo cleaner.
Getting the below error:
! [remote rejected] 19580_BugFix -> 19580_BugFix (pre-receive hook declined)
Hi @Kiran Kumar
The pre-receive-hook declined error is usually returned when you have some branch restrictions set up in your repository, and the commit you are trying to push does not meet the requirements of that branch restriction.
You can check the pre-recieve hook configuration policy is enabled in repositoty settings which can block this push.
Regards,
Mahesh Shinde
Hi @Kiran Kumar and welcome to the community!
I just wanted to add clarity to Mahesh's reply:
The branch restrictions that may cause this error are:
Allow rewriting branch history
If rewriting branch history is disabled, you won't be able to push your changes. What BFG does is rewrite history in the repo, so rewriting branch history needs to be enabled (even temporarily) in order to push changes with BFG.
Only specific people or groups have write access
You may have restricted write access to the branch only to specific users, and your user may not be included in that list. If this is the case, you will need to add your user to the list of users with write access to the branch.
Branch restrictions can be found from Repository settings > Branch restrictions.
Please feel free to let us know if that helps with resolving your issue or if you need further assistance.
If you would like us to run a git gc on your repo after you push your changes to remove any unreferenced commits and objects, please feel free to let me know.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.