git经常使用操做积累

1.代码commit了,可是没有push,怎么把commit的代码撤销掉。 <1>git log 找到要回退到的commit_idgit <2>git reset --hard commit_id ,回退到这个idapp <3> git push -f origin XXX(分支名称); [强行将本地回退后的分支 提交到 远程分支];fetch 2.git强制覆盖本地代码           $
相关文章
相关标签/搜索