🔖My Learning Notes and Memories - 分享我的学习片段和与你的回忆
Home Page:https://github.com/Wscats/articles
Geek Repo:Geek Repo
Github PK Tool:Github PK Tool
Wscats opened this issue 8 years ago · comments
git log 查看我们修改过的历史记录
git log
git reset --hard commit id 这是回退到某个版本,commit id号可以只是截取开始的一部分
git reset --hard commit id
dir 查看文件夹目录里面的所有文件
dir
cat 打印某个文件
cat
git reflog 查看记录你执行过的每一次命令
git reflog
git checkout 切换到某个分支
git checkout
git status push前看看修改过了什么文件
git status
git branch -d xxxx 删除本地分支,注意在当前这个分支不能删除自己,只能切换到其他分支再删除当前的这个分支
git branch -d xxxx
git branch -a 查看本地和远程分支
git branch -a
git merge xxx 合并xxx分支到当前分支
git merge xxx
git add [<file>] 添加文件到缓存区,也可以 "git add ." 添加所有文件到缓存
git add [<file>]
git diff [<file>] 比较当前文件和暂存区文件差异
git diff [<file>]
git checkout [<file>] 回滚指定文件
git checkout [<file>]
看不够的感觉,