git 码云的常用命令(版本控制)

首先在码云仓库创建对应的仓库

当你输入错误用户名和密码 需要
清掉配置 git config --system --unset credential.helper

设置账号

git config --global user.name "名称"

git config --global user.email "邮箱"

 

 

初始化版本库 

git init

 

提交暂存

git add -A

 

提交修改内容

git commit -m "first commit”

 

指定云端的项目地址

git remote add origin https://gitee.com/项目地址/项目名称.git 

 

拉取云端文件

git pull origin master --allow-unrelated-histories

《提示》:如果密码或用户名输入错误可以在windows 凭据中删除重新执行

 

推送同步到远端

git push -u origin master

posted @ 2019-01-09 10:49  Xcsg  Views(580)  Comments(0Edit  收藏  举报