
git
hw120219
这个作者很懒,什么都没留下…
展开
-
git 常用指令
1、回退命令: 回退到上个版本 git reset --hard HEAD^ 回退到前2次提交之前,以此类推,回退到n次提交之前 git reset --hard HEAD~2 退到/进到 指定commit的sha码 git reset --hard commit_id 2、强推到远程: git push origin HEAD --force git 版本找回方法 在 git reset --hard 之后,git 的版本会回退。 这个时候,需要使用 git reflog 去查看之前的操作 然后, 找到原创 2020-08-18 18:06:32 · 173 阅读 · 0 评论 -
git 常见错误总结
git push 时,报错如下 To https://g*********.git ! [rejected] stage -> stage (fetch first) error: failed to push some refs to 'https:/**.git' hint: Updates were rejected because the remote c...原创 2019-09-20 18:59:00 · 324 阅读 · 0 评论