-
创建仓库
-
创建项目文件夹并配置全局参数
配置全局参数
git config --global user.name "用户名"
git config --global user.email "邮箱"
- 获取并查看sshkey,将sshkey和代码仓库绑定
获取
ssh-keygen -t rsa -C "邮箱"
连按三次空格即可
查看
cat ~/.ssh/id_rsa.pub
与远程仓库绑定
- 查看连接
ssh -T git@gitee.com
- 初始化git
git init
- 绑定远程仓库
git remote add origin "仓库ssh"
- 代码合并
git pull --rebase origin master
- 更新内容至远程代码仓库
git add. //指定更新内容
git commit -m "注释" //添加更新说明
git push origin master //执行更新操作