Error 'push in master'

What happens

I’m trying to resolve the tons of mistakes in the past merges. I came back to the first commit and when I try to push to master I recived te message:
“remote: GitLab: You are not allowed to push code to protected branches on this project.
To Autonomic Jump / challenges · GitLab
! [remote rejected] master → master (pre-receive hook declined)
error: failed to push some refs to ‘Autonomic Jump / challenges · GitLab’”

What do you understand or find about that problem

I was trying to remove my branch to fix the mistakes but I think I did something very bad.

Did you try any workaround? What did you do?

Looking at Gitlab doc (Protected branches | GitLab), looking into stackoverflow and so many web and I don’t get any solve.

Evidences

I need help with

I need some solution to my problem with no pushing branch. I don’t know if I can start a new branch or somwthing like that. Please help me :c

Hi, the problem is that you are trying to push into master, have you tried to make your branch and moving into that branch?
edit: the master branch is protected, we have to push into our branches to do the changes and submit our code

Oh! You’re right.
I’m trying to avoid the multiple commits and I’m overwherming and I want to cry.

I can’t complete the first challenge because I keep making more and more commits.

When I try to go back to the first commit I do something wrong and I don’t know what to do.

Hello,

Remember that you must push your branch to the repository, not to the master branch because it is protected.

Oh! You’re right, I noticed that yesterday.

I’m trying to avoid the multiple commits and I’m overwherming and I want to cry.

I can’t complete the first challenge because I keep making more and more commits.

When I try to go back to the first commit I do something wrong and I don’t know what to do.

My question is related with these. I don’t understand what I’m doing.

Please please help.

image

Please clean and resubmit your branch to the repository, currently. Read carefully what your pi

I don’t know how to do this. I’m trying to understand your answer but I think a piece is missing.
Can you guide me about what can I do?
I’d really appreciate it.

I’m getting down with this…

Just delete your repository branch and push your local branch again.

make a backup of the files you modified and added and then delete the branch both local and remote, then you can create a new branch and make the modifications.

this may help you. chill down, take a glass of water and listen to some music, don’t give up! the first attempts are usually the harder ones <3

2 Likes