git reflog is useful
# Move the current head so that it's pointing at the old commit # Leave the index intact for redoing the commit git reset --soft HEAD@{1} # commit the current tree using the commit details of the previous # HEAD commit. (Note that HEAD@{1} is pointing somewhere different from the # previous command. It's now pointing at the erroneously amended commit.) git commit -C HEAD@{1}
--
Feng
没有评论:
发表评论