https://npm.taobao.org/mirrors/git-for-windows/
淘宝镜像
1.去官网下载,但是比较慢,最好是去阿里的一个网站下
2.一路next安装
3.设置用户名和email
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com
拉下码云项目:
1,获取ssh,使用githash,
git clone ...
可能会提交失败
看看你得公钥有没有弄好
没有的话就要生成密钥
在git中输入
ssh-keygen -t rsa -C "你的邮箱"
然后到C盘的用户下的本机用户下.ssh文件夹中得id_rsa.pub文件
cpoy出所有得公钥到码云得ssh公钥中,生成公钥
然后就能
git clone ...
提交
新生成一个文件
然后git add . 添加到暂存区
然后可以git status 查看状态
git commit -m "提交的信息" 本地提交上去,远程并没有提交
git push origin 你的分支 提交到远程
完成
小总结
Git鼓励大量使用分支:
查看分支:git branch
创建分支:git branch <name>
切换分支:git checkout <name>或者git switch <name>
创建+切换分支:git checkout -b <name>或者git switch -c <name>
合并某分支到当前分支:git merge <name>
删除分支:git branch -d <name>