赞
踩
- ##注释:配置用户
- git config --global user.name "your gitee name"
- git config --global user.email "your gitee emaild@xxx.com"
-
- ##注释:输入生成公钥文件
- ssh-keygen -t ed25519 -C "Gitee SSH Key"
-
- ##注释:以下这句命令会在vscode终端输出一串像乱码一样的字符串,全部复制后,去GitHub上找到setting,点击进##入后选取SSH and GPG keys,点击添加New SSH key公钥,不懂就看我贴的链接或自行百度
- cat ~/.ssh/id_ed25519.pub
-
- ##以上步骤完成后继续在VScode终端输入如下命令推送代码上传到github
-
- git init
- git add .
- git commit -m "注释的内容" ##注释:这句代码一定不能省略,双引号“”内的内容可任意修改
- git branch -M main ##注释:创建主分支
-
- ##根据自己自己的仓库地址而改变,如git remote add origin https://github.com/angj/ha.git
- git remote add origin 远程项目的Https地址
- git push -u origin main
-
![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。