本文最后更新于 2024-12-16T16:00:29+08:00
安装
查看是否安装 git
这是图片
配置
配置用户
1
| git config user.name "你的用户名"
|
1
| git config user.email "你的邮箱"
|
1
| git config --global user.name "你的用户名"
|
1
| git config --global user.email "你的邮箱"
|
查看 git 用户配置
- 查看系统 config
1
| git config --system --list
|
- 查看当前用户(global)配置
1
| git config --global --list
|
这是图片
- 查看当前仓库配置信息
1
| git config --local --list
|
这是图片
使用
上传到代码仓库管理平台
1 2
| # origin 为链接远程仓库的别名,可以改成别的 git remote add origin 远程地址
|
- 存到暂缓区
- 提交内容
- 提交到远程仓库
更新最新代码
查看当前分支状态
查看提交文件
更改 commit
提交规范
1 2 3 4 5 6 7 8 9 10 11 12
| feat: 新功能(feature) fix: 修补bug docs: 文档(documentation) style: 格式(不影响代码运行的变动) refactor: 重构(即不是新增功能,也不是修改bug的代码变动) chore: 构建过程或辅助工具的变动 revert: 撤销,版本回退 perf: 性能优化 test:测试 improvement: 改进 build: 打包 ci: 持续集成
|
git-emoji-guide
git 打 tag
用 git 给项目打
tag 标签
Git的使用
https://www.gongyibai.site/git的使用/