| 命令 | 说明 |
|---|---|
| git config user.name | 查看当前登录账号 |
| git config user.email | 查看当前登录邮箱 |
| git config --global user.name "Your_username" | 修改用户名 |
| git config --global user.email "Your_email" | 修改邮箱 |
| git remote add origin url | 添加远程仓库 |
| git remote set-url origin url | 切换远程仓库 |
| git remote show origin | 查看当前所在远程仓库 |
| git stash | 保存和恢复进度 |
| git stash pop | 将文件从临时空间 pop 下来 |
| git checkout -b <分支名> | 建立一个新的本地分支 |
| git config --global credential.helper store | 下一次提交代码的时候,输入了正确的用户名和密码,之后 就不需要输入用户名密码 |