git log查看当前分支的提交
git log --oneline查看当前分支的历史提交
git reflog查看所有分支的提交
####配置git昵称邮箱
- git config user.name febmaple
- git config user.email febmaple@xxx.com
####查看远程仓库
- git remote -v查看远程分支
####添加远程仓库
- git remote add duoduo git://github.com/xxxxx.git
####fetch远程仓库的所有分支
- git fetch duoduo
####fetch远程某一分之
- git fetch duoduo branch_name
####远程仓库的删除和重命名
- git remote rename duoduo shaoshao
- git remote rm duoduo
####关联远程origin分支
- git push -u origin branch_name
####git切tag
- 查看tag: git tag
- 切分支 : git checkout -b branch_name tag_name
####删除远程仓库的分支
- git branch -r -d origin/分支名
####远程先开好分支然后拉到本地
- git checkout -b feature-branch origin/feature-branch //检出远程的feature-branch分支到本地
####本地先开好分支然后推送到远程 - git checkout -b feature-branch //创建并切换到分支feature-branch
- git push origin feature-branch:feature-branch //推送本地的feature-branch(冒号前面的)分支到远程origin的feature-branch(冒号后面的)分支(没有会自动创建)
git别名
https://git-scm.com/book/zh/v2/Git-%E5%9F%BA%E7%A1%80-Git-%E5%88%AB%E5%90%8D