我是絕對新的GIT我有以下疑問。git log得到的圖表究竟是什麼意思?
成對其我對我工作的一個項目做:
[email protected] MINGW64 ~/Documents/WS_vari/version-control/asteroids (master)
$ git branch
* master
所以應該豆,我有隻有主分支在這個項目。我的解釋是否正確?
然後,我希望看到與此相關的項目執行承諾的圖形:
git log --graph --oneline --decorate=full --all
,這是我的輸出:
[email protected] MINGW64 ~/Documents/WS_vari/version-control/asteroids (master)
$ git log --graph --oneline --decorate=full --all
* cba1887 (HEAD -> refs/heads/master) fixing: fixed the bug related of the weapo
n delay
* 3884eab (refs/remotes/origin/master, refs/remotes/origin/HEAD) Add color
* 3e42136 now using requestAnimationFrame
* 4035769 frame interval was set wrong after game was paused
* 25ede83 a couple missing ends with the ipad version
* df03538 I can't spell 'screen' apparently :)
| * 354dfdd (refs/remotes/origin/coins) Make ships able to spawn on coins
| * 0c6daf1 Make it possible to collect coins
| * a3c0ae4 Create helper functions
| * 656b02e First pass at adding coins
|/
* b0678b1 Revert controls
* f19cb1b Fix typo in space
* 75928a9 Use space for movement and enter for shooting
* ac83b72 mostly finished ipad version
* 7ca4826 trying to get div touch controls to work
....................................................................
....................................................................
....................................................................
所以我認爲,這意味着:
1)最後一次提交的ID爲cba1887並且此提交進入主文件 branc H。
我的問題是在圖表的這一部分:
* df03538 I can't spell 'screen' apparently :)
| * 354dfdd (refs/remotes/origin/coins) Make ships able to spawn on coins
| * 0c6daf1 Make it possible to collect coins
| * a3c0ae4 Create helper functions
| * 656b02e First pass at adding coins
|/
所以,在我看來,它是創建具有ID df03538(分支可以有一個ID一個新的分支還是我失去了一些東西?)和標籤我不能拼出'屏幕'顯然:)。
這個分支包含4個提交的ID 354dfdd,0c6daf1,a3c0ae4,656b02e。
難道我的解釋是正確的還是我錯過了什麼?
如果我的理解是正確的,這是一個新的分支,爲什麼我不能看到它變成由以前的git 分支 statment僅顯示了主分支obtined分支機構的名單?
運行'git分支'本身只顯示你*本地*分支。運行'git branch -a'來查看本地和遠程分支,這可能有助於更好地理解事情。 – larsks
@larsks mmm本地分支和遠程分支之間的區別是什麼?你能給我更多關於這個東西的信息嗎? – AndreaNobili
我將你引用到[the git book](https://git-scm.com/book/en/v2)獲取答案,其中包括對[remote branches]的明確討論(https://git-scm.com) /電子書/它/ V2/Git的分支 - 遠程分支)。 – larsks