美文网首页
git回滚到任意版本

git回滚到任意版本

作者: iloveyou6415 | 来源:发表于2017-03-02 17:54 被阅读0次

    先显示提交的log

    $ git log -3commit4dc08bb8996a6ee02fAuthor: Mark Date:  Wed Sep708:08:532016+0800xxxxxcommit9cac9ba76574da2167Author: xxxDate:  Tue Sep622:18:592016+0800improved the requstcommite377f60e28c8b84158Author: xxxDate:  Tue Sep614:42:442016+0800changedthepasswordfromemptytomax123

    回滚到指定的版本

    gitreset--hard e377f60e28c8b84158

    强制提交

    gitpush-f origin master

    完美

    相关文章

      网友评论

          本文标题:git回滚到任意版本

          本文链接:https://www.haomeiwen.com/subject/oeskgttx.html