git - 怎样彻底删除一个分支/master push失败
ringa_lee
ringa_lee 2017-05-02 09:35:52
0
2
528

push master分支的时候出现了这样的错误:

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'

master分支只能pull 不能push 其他分支正常, 网上搜了下说要删掉.git里面两个文件 我弄了但是没成功

我记得之前在master上回退过版本 可能误删了什么东西, 所以打算把本地的master分支直接删了重新pull下一个全新的master分支, 我用了fetch 然后checkout master 然做了点修改尝试push, 韩式上面那个错误

我想可能是需要把 git branch -D 删掉的分支彻底删除才行, 大神快来

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