git常用方法、命令
查看用户名和email
$ git config user.name
$ git config user.email
创建用户名和email
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
修改并提交
$ git add 文件名
$ git add --all
$ git commit -m "备注信息"
$ git push -u origin master
$ git push origin master
分支管理
$ git pull
$ git fetch
$ git switch master
$ git switch -c dev
$ git branch
$ git remote update origin --prune
$ git branch -D master
$ git merge dev
修改分支名
git branch -m oldName newName
git push --delete origin oldName
git push origin newName
创建SSH Key
$ ssh-keygen -t rsa -C "youremail@example.com"
查看历史提交
$ git log