git stash // 执行存储
git pull //拉去远程代码
git stash apply //应用某个储存
git add . //所有提交暂存区
git commit -m “xxxx” //提交缓存区
git log --graph --oneline //查看提交graph
git log //查看提交commit
git cherry-pick //其他分支提交本分支
git status //查看当前git状态
git diff --staged git diff --cached //查看暂存区修改
git diff // 查看工作区修改
git push //提交远程
git push : //选择commit提交远程
远程仓库名,默认为origin
提交的唯一码
远程分支名
git checkout -b xxx //创建本地分支
git branch //查看本地所有分支
git branch -r //查看远程分支
git branch --set-upstream-to=origin/xxx xxx //本地连接远程分支
git reset --hard // 回退commit 提交
git stash list // 查看哪些stash 存储
git stash show //显示做了哪些改动默认第一个 显示其他的 stash@{$num} 比如第二个 stash @{1}
git stash pop //恢复之前的工作目录将缓存的删除
本文章自己总结,仅供参考,有不对的地方请各位大神多多指教。