git#reflog

来源:互联网 发布:阿里云如何购买域名 编辑:程序博客网 时间:2024/05/16 19:19

今天push的时候提示
error: failed to push some refs to ‘http://…’
hint: Updates were rejected because the tip of your current branch is behind.
看到提示我才反映过来是不是昨天的rest导致的。我又不确定进行了reset,于是git log一看,看不到什么信息。网上一搜才发现如果想查看所有的日志 要用git reflog。一查果然,昨天有进行过reset。导致当前的head 和remote的不一样。于是通过找到reset之前的版本,然后再次reset一下,最后从新commit一下,解决。git还很水啊。

0 0
原创粉丝点击