$ git config --global --list # 查看全局配置$ git config --local --list # 查看本我的项目配置$ git config --global user.name hoby # 批改提交名$ git config --global alias.br branch # 批改简写$ git config --global core.ignorecase false # 敞开疏忽大小写$ git config --unset alias.name # 默认删除以后我的项目配置,--global删除全局
1、$ git config --global --list #查看以后配置
未配置,则执行以下命令进行配置:
1.设置账号和邮箱 git config --global user.name "自已的用户名" 例:git config --global user.name "fenlin" git config --global user.email "本人的邮箱" 例:git config --global user.email "****@163.com"2.查看秘钥是否存在(第一次增加可能不存在能够间接下一步) cd ~/.ssh3.生成秘钥 ssh-keygen -t rsa -C "本人的邮箱与下面邮箱统一" 按三次回车 例: ssh-keygen -t rsa -C "***@163.com"4.查看秘钥,并复制到码云或github的ssh里 cat ~/.ssh/id_rsa.pub
切换分支
git checkout xxx "你的分支名称"
合并分支代码
git merge xxx "你的分支名称"