Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #8361

Closed
Open
Created Nov 20, 2014 by Administrator@rootOwner

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.
Assignee
Assign to
Time tracking