git submit "push rejected", how to solve

A particular intellj idea submitted git always fail. Ask others is a very shameful thing.

I have my pull down the code again, then changed files added eleven go up. There is no question of conflict. But it is not.

Fortunately, a colleague gave the following guidance.

In the project directory, right below "git Bash here"

input the command:

$ git pull
Already up to date.

lunmei@DESKTOP-5COD9DQ MINGW64 /f/workspace2/translation (master)
$ git pull origin master
From http://192.168.1.50/project/translation
* branch master -> FETCH_HEAD
Already up to date.

lunmei@DESKTOP-5COD9DQ MINGW64 /f/workspace2/translation (master)
$ git pull origin master --allow-unrelated-histories
From http://192.168.1.50/project/translation
* branch master -> FETCH_HEAD
Already up to date.

lunmei@DESKTOP-5COD9DQ MINGW64 /f/workspace2/translation (master)
$ ^C

lunmei@DESKTOP-5COD9DQ MINGW64 /f/workspace2/translation (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)

nothing to commit, working tree clean

lunmei@DESKTOP-5COD9DQ MINGW64 /f/workspace2/translation (master)
$ git push
Enumerating objects: 114, done.
Counting objects: 100% (114/114), done.
Delta compression using up to 12 threads.
Compressing objects: 100% (62/62), done.
Writing objects: 100% (84/84), 16.57 KiB | 1.38 MiB/s, done.
Total 84 (delta 16), reused 0 (delta 0)
remote: GitLab: You are not allowed to push code to protected branches on this p roject.
To http://192.168.1.50/hlhlo/translation.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://192.168.1.50/project/translation.git'


Discover the cause of the error is not assigned the appropriate permissions to me. master branch received protection. Only the main programmers and owners can submit code. And other status, such as the developers have no authority. The manager permission to change it back, no problem.
----------------
Disclaimer: This article is CSDN blogger "I love round yo 'original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/fulq1234/article/details/82887677

Guess you like

Origin www.cnblogs.com/lijinchang/p/11432931.html