-- 远程新建分支,本地没有该分支,会自动跟踪远程的同名分支
git checkout --track origin/branch_name
-- 已有本地分支创建关联
git branch --set-upstream-to origin/branch_name local_branch_name
-- 取消本地分支与远端分支的关联
git branch --unset-upstream local_branch_name
-- 撤销本地commit
git reset head~
-- 查看当前状态
git status
-- 查看提交记录
git log
-- 查看所有分支
git branch -a
-- 删除分支
git branch -d branch_name
-- 切换分支
git checkout branch_name
-- 合并分支
git merge branch_name
-- 仅修改 message 信息
git commit --amend --message="modify message by daodaotest"