1.在gitee上使用
1.git init
2.git add .
git add README.md
3.git commit -m"first commit"
4.git remote add myOrigin git@github.com:Tem-man/smart_examination.git
git remote
5.git push -u myOrigin main
2.在github上使用
1.git init
2.git add .
git add README.md
3.git commit -m"first commit"
4.git remote add myOrigin git@github.com:Tem-man/smart_examination.git
git remote
5.git push -u myOrigin main
3.克隆/拉取
1.克隆:git clone
2.拉取更新 :git pull origin master
4.创建分支/合并分支
1.创建分支:git branch dev(分支名称)
2.查看分支:git branch
3.切换分支:git checkout stable(分支名) git checkout -b stable(创建分支并切换)
4.合并分支:git merge dev (切换到stable分支后,合并dev分支到stable分支 )
5.git生成密钥的命令
1.检查是否配置密钥:git config --global --list
2.生成密钥:ssh-keygen -t rsa -C "你的邮箱"
6.git移除关联仓库
git remote remove origin