Git操作指南
初始化Git仓库
1 | git init |
添加文件
1 | git add * |
提交
1 | git commit -m[msg] |
查看提交记录
1 | git log |
创建分支
1 | git branch (branchname) |
切换分支
1 | git checkout (branchname) |
列出分支
1 | git branch |
删除分支
1 | git branch -d (branchname) |
显示完整的commit记录
1 | git reflog show |
设置HEAD的指向
1 | git reset --hard [commit id] |
Comments