GIT
| git命令 | 说明 |
|---|---|
| git config --list | 查看配置信息 |
| git config user.name git config user.password git config user.email |
查看git用户名、密码、邮箱的配置,设置空格后面加引号 |
| git config --global user.name git config --global user.password git config --global user.email |
设置git用户名、密码、邮箱的配置(全局配置) |
| git init | 初始化仓库 |
| git status |
查看仓库状态 |
| touch | 当前目录下创建文件 |
| git add | 添加文件 |
| git commit |
保存仓库的历史记录 |
远程仓库命令
-v 查看所有参数
| git remote | 查看远程仓库简简称 |
|---|---|
| git remote | 查看所有仓库参数 |
| git remote add name Address | 添加远程仓库链接 |
| git push name name | 推送置远程仓库 |
| git remote remove name | 远程仓库移除 |
GIT版本命令
| git --version | 查看本地git版本 |
|---|---|
| git update-git-for-windows | git更新 |
分支命令
| git branch |
查看本地分支 | |
|---|---|---|
| git branch name | 创建本地分支 | |
| git branch -r | 查看远程分支 | git branch -agit branch -agit branch -agit branch -agit branch -a |
| git branch -a | 查看所有分支 | |
| git branch -d name | 删除本地分支 | |
| git push name --delete name | 删除远程分支 |
|
| git checkout name | 切换分支 |
参考资料
Git安装参考:Git 详细安装教程(详解 Git 安装过程的每一个步骤)_git安装_mukes的博客-CSDN博客
git官网下载:Git - Downloading Package (git-scm.com)
git生成win环境ssh密钥:https://blog.csdn.net/weixin_44933530/article/details/125993172
git官方命令参考:https://git-scm.com/book/zh/v2