1.使用git --version查看是否安装git.没安装自行安装
2.git clone (https://.......)码云项目的https连接。然后输入码云的账号、密码。
复制码云项目里面的东西到Linux下。
3.把新的文件放到下载下来的文件夹里面。
4.使用git init创建本地仓库
5.再使用(git add .)添加所有文件
6.使用(git commit -m "**")提交要的文件夹,**表示文件夹名称
7.使用(git remote add origin https://.......)连接关联码云。码云项目的https,然后输入码云的账号、密码。如果出现路径存在了使用(git remote rm origin)删掉
8.使用(git push -u origin master)上传本地库到码云项目里面。
切换分支:git checkout name
撤销修改:git checkout – file
删除文件:git rm file
查看状态:git status
添加记录:git add file 或 git add .
添加描述:git commit -m “miao shu nei rong”
同步数据:git pull
提交数据:git push origin name
分支操作
查看分支:git branch
创建分支:git branch name
切换分支:git checkout name
创建+切换分支:git checkout -b name
合并某分支到当前分支:git merge name
删除分支:git branch -d name
删除远程分支:git push origin :name
参考:https://blog.csdn.net/chixiang3533/article/details/100799385