🔄

常用命令

💡
Notion Tip: This page documents processes product managers should follow to ship features at Acme Corp. Helpful for getting new employees up to speed.

仓库相关

配置远程仓库

git remote add origin url
 

删除远程仓库

git remote rm origin
 

查看远程仓库信息

git remote -v
 

配置相关

👉
git config命令的--global参数,用了这个参数,表示你这台机器上所有的Git仓库都会使用这个配置,当然也可以对某个仓库指定不同的用户名和Email地址。
查看git配置信息
git config --list
查看git用户名、密码、邮箱的配置
git config user.name
git config user.password
git config user.email
设置git用户名、密码、邮箱的配置
git config user.name "username"
git config user.password "password"
git config user.email "xxx@xx.xx"
设置git用户名、密码、邮箱的配置(全局配置)
git config --global user.name "username"
git config --global user.password "password"
git config --global user.email "xxx@xx.xx"
修改和设置一样