我是绝对新的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