git上传代码
配置全局账户信息
- git config –global user.name “cjzywyz”
- git config –global user.email “710113424@qq.com“
- 生成ssh公钥:ssh-keygen -t rsa -C “你的邮箱地址”
提交文件
- 初始化:git init
- 将本地库与远程库关联:git remote add origin 远程库地址
- 暂存文件:git add .
- 提交文件到本地库:git commit -m “备注”
- 推送到远程库:git push origin 本地分支:远程分支
分支
- 主分支:master;
- 创建分支:git branch ***
- 切换分支:git checkout ***
- 查看分支:git branch