美文网首页Git相关
git如何放弃所有本地修改

git如何放弃所有本地修改

作者: Pandakingli | 来源:发表于2017-03-09 09:18 被阅读600次
    git checkout . #本地所有修改的。没有的提交的,都返回到原来的状态
    git stash #把所有没有提交的修改暂存到stash里面。可用git stash pop回复。
    git reset --hard HASH #返回到某个节点,不保留修改。
    git reset --soft HASH #返回到某个节点。保留修改
    

    相关文章

      网友评论

        本文标题:git如何放弃所有本地修改

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