git 回滚 commit 的近几回版本

问题:咱们在使用git本地commit时,若是commit了好屡次没有push,又想把最后一次或者最近几回commit的不想push了,能够用下面的方法撤销(推荐使用第一种)。git 注意:git 只能撤销最后一次或者最后屡次的commit,不能只撤销中间的某一次!!!ide 解决办法:idea (1)最方便,不须要commit_id:使用命令 git  reset  --hard  head~1
相关文章
相关标签/搜索