git checkout
commit模式
查看当前分支的HEAD信息
git checkout [HEAD]M one.js
M work.js
Your branch is up to date with 'origin/checkTag'.切换HEAD到某个分支上
git checkout <branch_name>新建一个分支,切换HEAD该分支上
切换HEAD到某个提交快照上
file模式
切换某个文件到某个分支/提交快照上
强制撤销修改
Last updated
Was this helpful?