通过git把本地代码提交到代码仓库
git init
git remote add origin https://xxx.git
git add .
git commit -m "Initial commit"
git push -u origin master
代码报错
To https://git.xxx.com/shop/shop-client.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.xxx.com/shop/shop-client.git'
我发现是我的代码权限不足,找人帮我开通master权限
首先我们通过git checkout master切换到master分支上,然后通过git merge origin/”个人分支“,把”个人分支“的内容合并到本地master分支,最后git push,把master的内容也提交到了线上.