git init # 初始化
git add xxx.txt # 将xx.txt 添加到暂存区
git commit -m "coments" # 将暂存区文件提交
git log # 查看版本日志

git status # 查看暂存区状态, 也可看到文件是否冲突

git diff #比较文件在暂存区和工作区的差异
git show <commitid> # 显示提交的详细信息

git reflog # 查看历史版本
git reset --hard head^ # 回到上一个版本
git reset --hard <commit id> # 回退到版本 commit id = xxx
git pull origin master # 从主分支pull到本地
git push origin master # 从本地push到master
git push # push到默认主分支
git pull # pull到默认主分支
git checkout -b aa # 创建并切换到aa分支
git branch # 查看当前分支

git merge aa # 把aa 分支合并到master分支
git merge #把当前分支合并到master 分支
git branch -d aa # 删除分支aa
git checkout -b feature1 # 创建分支feature1
git checkout master # 切换到master分支
git status #显示缓存区文件及冲突状态
9281

被折叠的 条评论
为什么被折叠?



