3 回答
![?](http://img1.sycdn.imooc.com/545865470001bf9402200220-100-100.jpg)
慕沐林林
TA贡献2016条经验 获得超9个赞
git rebase
git merge --squash
git reset --soft HEAD~3 && git commit
git rebase -i
git commit
:
git reset --soft HEAD~3 && git commit --edit -m"$(git log --format=%B --reverse HEAD..HEAD@{1})"
![?](http://img1.sycdn.imooc.com/545868b60001587202200220-100-100.jpg)
翻阅古今
TA贡献1780条经验 获得超5个赞
git merge --squash
git rebase -i
git status
git reset --hard
# Reset the current branch to the commit just before the last 12: git reset --hard HEAD~12 # HEAD@{1} is where the branch was just before the previous command. # This command sets the state of the index to be as it would just # after a merge from that commit: git merge --squash HEAD@{1} # Commit those squashed changes. The commit message will be helpfully # prepopulated with the commit messages of all the squashed commits: git commit
git merge
--squash
最新情况:git reset --soft HEAD~12 && git commit
- 3 回答
- 0 关注
- 580 浏览
添加回答
举报
0/150
提交
取消