码云使用

1.下载安装Git  https://git-scm.com/download/win。

2.注册码云,生成SSH公钥 ,添加SSH公钥

3.创建项目

这个是完整的创建流程

https://blog.csdn.net/lishanleilixin/article/details/81671453

https://blog.csdn.net/ai1362425349/article/details/82119889?depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2&utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2

注:上传显示 fatal: Could not read from remote repository. 问题

解决办法

https://blog.csdn.net/hellokandy/article/details/89976156

 https://www.cnblogs.com/janve/p/10946630.html

4.关于git你日常工作中会用到的一些东西

这些弄好后。下次再往码云上传项目就直接创建仓库,

再D盘选取要穿的项目,右击 Git Bash Here ,执行以下命令

①通过命令git init命令把这个文件夹变成Git可管理的仓库,同时项目下会生成.git文件

②通过命令git status 查看该项目下文件的状态

③使用git add . 或者 git add -A 把项目添加到本地仓库中(.git文件夹)

注:若出现

warning: LF will be replaced by CRLF in ...... 

The file will have its original line endings in your working directory. 

可以通过git config --global core.autocrlf false命令解决

④使用 git commit -m '注释'命令把项目提交到本地仓库

 在码云创建好仓库把HTTPS复制出来

 ⑤本地仓库与线上仓库关联 git remote add origin 

 ⑥git pull --rebase origin master 通过该命令把线上的readme文件与本地仓库合并

  通过git push -u origin master -f 命令把本地仓库代码强制推到线上仓库

完整命令

从码云拉去项目到 本地 git clone 

https://blog.csdn.net/Steriles_/article/details/83022608

在拉取报错  Please make sure you have the correct access rights and the repository exists.

解决方法 http://www.bubuko.com/infodetail-2374719.html

在vscode里面操作git提示无法将“git”项识别为 cmdlet、函数、脚本文件或可运行程序的名称

解决办法:https://blog.csdn.net/weixin_43803924/article/details/104606989

在vscode中 Not a git repository (or any of the parent directories): .git

解决办法 https://blog.csdn.net/wenb1bai/article/details/89363588

github报错:The file will have its original line endings in your working directory

解决方法https://blog.csdn.net/qq_37521610/article/details/88327286

VScode 结合git命令使用

https://blog.csdn.net/weixin_43314519/article/details/107572206

1.未提交前是黄色的文件
2.点击+ 暂存更改 后面显示"A",


3.点击对勾,“提交”页面中间会弹出master 消息的,写要提交的注释
4点击向上的箭头,同步到远程服务器上

原文地址:https://www.cnblogs.com/cyhsmile/p/12743104.html