装置

yum –y install git // Linux零碎brew install git // Mac零碎

配置

ssh-keygen -t rsa -C "你的邮箱" // 创立秘钥git config --global user.name "John Doe" git config --global user.email johndoe@example.comgit config --global --list // 查看以后用户配置 

标签

git tag -a R20190218-01 // 打标签git push origin R20190218-01 // 推送标签git tag -d R20190218-01 // 删除本地标签 git push --delete tag R20190218-01 // 删除远端标签

增加新仓库

git init // 初始化本地代码git remote add origin "github仓库地址" // 增加远端git地址git push -f origin master // 强制推送