git reset --soft HEAD~3 &&
git commit
git reset 简介:
| Tree | Role |
|---|---|
| HEAD | Last commit snapshot, next parent |
| Index | Proposed next commit snapshot |
| Working Directory | Sandbox |
- --soft 只移动HEAD指针
- --mixed 移动HEAD,Index指针
- --hard 移动HEAD,Index,Working Directory
git reset --soft HEAD~3 &&
git commit
git reset 简介:
| Tree | Role |
|---|---|
| HEAD | Last commit snapshot, next parent |
| Index | Proposed next commit snapshot |
| Working Directory | Sandbox |