Protected Branches
Created by: MrKeiKun
Information:
I'm trying to re-write the history of a certain branch(protected). I tried to push(git push origin someBranch -f
) and it doesn't work. Same thing with git push origin someBranch
, it doesn't work.
Procedure:
Kei@KEIKUN-PC /d/Awesome/project (someBranch)
$ git push origin someBranch -f
Counting objects: 94, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (22/22), 3.96 KiB | 0 bytes/s, done.
Total 22 (delta 20), reused 0 (delta 0)
remote: GitLab: You are not allowed to access some of the refs!
To [email protected]:awesome/project.git
! [remote rejected] someBranch -> someBranch (pre-receive hook declined)
error: failed to push some refs to '[email protected]:awesome/project.git'
Kei@KEIKUN-PC /d/Awesome/project (someBranch)
$ git push origin someBranch
To [email protected]:awesome/project.git
! [rejected] someBranch -> someBranch (non-fast-forward)
error: failed to push some refs to '[email protected]:awesome/project.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.