git - How to completely delete a branch/master push fails
ringa_lee
ringa_lee 2017-05-02 09:35:52
0
2
633

Push masterThe following error occurred when branching:

To git@gitlab.ddcard.com.cn:csntgao/qiaruqifen.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@gitlab.ddcard.com.cn:csntgao/qiaruqifen.git'

masterThe branch can only be pulled but not pushed. Other branches are normal. I searched online and said that I need to delete the two files in .git. I did it but failed

I remember that I might have deleted something by mistake when I rolled back the version on the master, so I planned to delete the local master branch and pull a new master branch again. I used fetch and then checkout master Then I made some modifications and tried push, but the same error occurred in the Korean version

I think it may be necessary to completely delete the branch deleted by git branch -D. Master, please come soon

ringa_lee
ringa_lee

ringa_lee

reply all(2)
过去多啦不再A梦

Look at the article I wrote, how to use github and common mistakes

迷茫

You may consider rolling back the local master to the same version as the online one

git reset --hard ooxxooxx

ooxxooxx represents the version number seen using git log. It’s a long string
and then

git pull

Go on and finish the work, commit and push
If you can’t push, it basically means that your account does not have push permission to the remote master

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template