git 的add .commit. branch,merge 都基本能用了.
但是撤消,还是不太理解.
求科普.
我有一 branch 如下:
dev5 -> dev4 -> dev3 -> dev2 -> dev1 -> dev0
其中 dev0是最新提交的,现在我突然发现其中有段代码出错了,我想撤消 这次提交.
即撤消 git add , git commit 这两个动作.
同时我之前的修改要还在,不然我又得重新写代码,哭死啊.
同时求解释 rebase, revert, reset 作用与区别.
但是撤消,还是不太理解.
求科普.
我有一 branch 如下:
dev5 -> dev4 -> dev3 -> dev2 -> dev1 -> dev0
其中 dev0是最新提交的,现在我突然发现其中有段代码出错了,我想撤消 这次提交.
即撤消 git add , git commit 这两个动作.
同时我之前的修改要还在,不然我又得重新写代码,哭死啊.
同时求解释 rebase, revert, reset 作用与区别.



