git合并未(push)提交commit
git log
# 查看想退回的版本,按q键退出
git reset 回退的版本(那个hash值)
然后就可以重新commit了
git合并已(push)提交commit
git log
# 查看想退回的版本,按q键退出
git reset 回退的版本(那个hash值)
# 这个时候直接push是失败的,因为本地版本比较旧(需要强制推送)
git push -f
然后就可以重新commit了
如果你重新提交的代码,有增加,有删减,推荐这样重新提交
git add .
git commit -a -m "注释"
git push