GoLang上传module至GitHub

1. Git绑定与GitHub一致的邮箱,用户名

2. 将Git生成的ssh添加至github

3.上传代码至github

1.到你所在的项目文件夹里 main.go同级
2. 构建mod文件 go mod init github.com/Winnie996/calculate (这个一般是在github创建项目后的浏览器网址)
3.右键空白处 Git Bash here
输入代码

1. 初始化 git
git init
2. 添加所有文件 . 表示所有
git add .
3. 提交所有到本地仓库 “备注信息”
git commit -m "Some calculator functions"
4. 连接远程仓库   [email protected]:Winnie996/calculate.git 是地址 在你在GitHub创建项目后可以看见
git remote add origin [email protected]:Winnie996/calculate.git
5. 将项目推送到远程仓库
git push -u origin master
6. 设置版本
git tag v0.0.1
7. 将版本标签推送过去
git push origin --tag

你可能感兴趣的:(GOLang,github,git)