碼雲git問題

1. 命令git push -u origin master時候git

錯誤提示:failed to push some refs to github

解決辦法:git pull origin master//先把遠程服務器github上面的文件拉先來,再push 上去。服務器

錯誤提示:Couldn't find remote ref mastecode

錯誤提示:refusing to merge unrelated historiesrem

解決辦法:git pull origin master --allow-unrelated-histories//將以前的git pull origin master修改一下it

二、添加步驟:ast

2.1:email

git init

2.2:變量

git remote add origin git@gitee.com:liaoxuefeng/learngit.git

 2.3:配置

git pull origin master --allow-unrelated-histories

2.4:

git push -u origin master

2.5:

git add .

2.6:

git commit -m 'first'

2.7:

git push

三、遇到須要賬號密碼的,代碼管理碼雲git設置帳號密碼

3.1 配置全局變量

git config --global user.name "碼雲用戶名"

git config --global user.email "碼雲註冊郵箱"

3.2

設置郵箱帳號

git config --global user.email "you@example.com"

設置碼雲暱稱

git config --global user.name "Your Name"

相關文章
相關標籤/搜索