赞
踩
问题描述
新人新项目
第一次绑定公共钥匙以后,
git init
git add .
git commt -m xxx
git remote add origin git@gitee.com:xxxxxxx/myhr-2022625.git
git push -u origin master的时候报错 (以下)
To gitee.com:hellohaotian/dianshang20220625.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@gitee.com:hellohaotian/dianshang20220625.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
- 尝试了很多解决方案,
最后没搞清楚原因,但是这个操作是朋友老师讲的
然后重新执行
git init
git add .
git commit -m xxx
git remote add origin git@gitee.com:xxxxxxx/myhr-2022625.git (含义是给远程仓库起个名字origin)
git push -u origin master
后续操作
解决
电子竞技
菜是原罪
加油
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。