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

Force field addon

Ashish Yadav September 3, 2015

I installed this plugin to protect my master branch. https://marketplace.atlassian.com/plugins/com.carolynvs.force-field

However, I am still able to push --force to master. How can I prevent the force push to master? What step am I missing?

 

$ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
$ git reset --hard
HEAD is now at 0a0cb0c push should get blocked. force again
$ vi file1
$ git add file1
$ git commit -m "push should fail"
[master 1ca0131] push should fail
1 file changed, 1 insertion(+)
$ git push --force origin master
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 361 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
0a0cb0c..1ca0131 master -> master

 

 

2 answers

0 votes
GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2015

Installing the add-on and enabling it in a repository are 2 different things. Make sure you did enable this hook for this particular repository.

0 votes
TimP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2015

@Carolyn Van Slyck (who maintains that add-on) might be able to weigh in here.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events