git 的一些小 tips
时间:2020-03-04 19:12:07
收藏:0
阅读:53
git撤销已经push到远端的commit
现在本地回退到相应版本`git reset --hard <版本号>` // 注意使用 --hard 参数会抛弃当前工作区的修改 // 使用 --soft 参数的话会回退到之前的版本,但是保留当前工作区的修改,可以重新提交为了覆盖掉远端的版本信息,使远端的仓库也回退到相应的版本,需要加上参数--force
git push origin <分支名> --force参考:https://blog.csdn.net/xs20691718/article/details/51901161
原文:https://www.cnblogs.com/leafs99/p/git_tips_01.html
评论(0)