LOG
git log # 查看当前分支的全部提交记录
git reflog # 查看所有分支的全部提交记录
git log/reflog -10 # 查看前10条记录
git log -10 --oneline # 展示前10条提交记录的大概记录
git shortlog # 按提交的作者分类
git log --pretty=format:"%cn committed %h on %cd" # cn会替换成作者姓名, h 换成标志符, cd 换成提交时间
git log --author=shadow # 按提交用户查看
git log --before='2019-04-15' # 按提交时间
git log --grep='feat' # 按提交信息
git show # 追踪最近一次提交的文件更改
git show commit_id # 追踪指定提交的文件更改
git log -- fielname # 查看指定文件的历史提交记录
git log -p filename # 查看指定文件的每次提交diff
git diff # 追踪文件工作区与暂存区的差别commit
git commit -m'feat(application): feat component for test feat#01' # 提交添加注释
git commit --amend # 修改最近一次提交的注释usual
git branch dev # 新建一个dev分支
git branch --move devs # 重命名一个分支
git branch -d dev # 删除指定分支
git checkout -- filename # 放弃工作区文件的追踪
git chekout -- '*.js' # 放弃工作区所有.js文件的更改
git checkout -- [path] # 放弃工作区全部文件的追踪
git checkout -b dev # 切换指定分支
git cherry-pick bug ee883aa # 拉取指定分支的指定提交
git cherry-pick bug eeaas33...aa2233a # 拉取指定分支的区间提交
git remote get-url origin # 获取指定远程连接的url
gir remote add origin git@gitssh # 添加一个指定的源reset
参考链接: