git中幾天前漫不經心的使用了git checkout ver_hash的命令,結果push到遠程庫都提示everything is up-to-date,實際神馬都沒提交上去啊!但看本地log中的確有更新哦!後來用再做git st命令時發現老有一行紅字:
HEAD detached from 548a7fa
研究了一下發現當前貌似生成了一個臨時的br:
* (detached from 548a7fa) b7451ea v0.8 重新導入了真實的題庫
master 548a7fa v0.6 加入分頁功能
每次本貓都是git push origin master當然沒法更新啊,因為master是和遠程庫一致的,只不過是舊的。
知道原因後解決就很簡單鳥,直接用git checkout master切回master br吧,然後別忘了用
git reset --hard b7451
命令切到最新的hash啊。
GitHub 教程系列文章:
GitHub 使用教程圖文詳解 http://www.linuxidc.com/Linux/2014-09/106230.htm
Git 標簽管理詳解 http://www.linuxidc.com/Linux/2014-09/106231.htm
Git 分支管理詳解 http://www.linuxidc.com/Linux/2014-09/106232.htm
Git 遠程倉庫詳解 http://www.linuxidc.com/Linux/2014-09/106233.htm
Git 本地倉庫(Repository)詳解 http://www.linuxidc.com/Linux/2014-09/106234.htm
Git 服務器搭建與客戶端安裝 http://www.linuxidc.com/Linux/2014-05/101830.htm
Git 概述 http://www.linuxidc.com/Linux/2014-05/101829.htm
分享實用的GitHub 使用教程 http://www.linuxidc.com/Linux/2014-04/100556.htm