0
点赞
收藏
分享

微信扫一扫

Git如何放弃所有本地修改

楠蛮鬼影 2023-04-17 阅读 91


git checkout . #本地所有修改的。没有的提交的,都返回到原来的状态

git stash #把所有没有提交的修改暂存到stash里面。可用git stash pop回复。

git reset --hard HASH #返回到某个节点,不保留修改。

git reset --soft HASH #返回到某个节点。保留修改

举报

相关推荐

0 条评论