git 回滚指定行
Stage the parts you want with git add -p
, then discard (git checkout -- filename
) the unstaged changes.
Update for Git 1.6.5+
In version 1.6.5, Git learned to checkout with a -p/--patch
flag. You can discard chunks in one step with git checkout -p -- filename
.
git checkout -p -- filename
能够按区块进行回滚工作区。
澄轶: suanec -
http://www.cnblogs.com/suanec/
友链:marsggbo
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。您的鼓励是博主的最大动力!
点个关注吧~
http://www.cnblogs.com/suanec/
友链:marsggbo
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。您的鼓励是博主的最大动力!
点个关注吧~