Git rebase没有生成可快速转发的提交

Git rebase没有生成可快速转发的提交,git,git-rebase,Git,Git Rebase,因此,我一直在尝试使用以下post-commit钩子使我的gh页面分支与master保持最新: #!/bin/sh git checkout gh-pages git rebase master git checkout master 根据建议 这是我的git-lg命令的一些输出,就是这个,我在这里的某个地方找到了它,所以,感谢发布它的人 [alias] lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Cre

因此,我一直在尝试使用以下post-commit钩子使我的gh页面分支与master保持最新:

#!/bin/sh
git checkout gh-pages
git rebase master
git checkout master
根据建议

这是我的git-lg命令的一些输出,就是这个,我在这里的某个地方找到了它,所以,感谢发布它的人

[alias]
    lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
在这里,我很好奇的是,为什么标有CreateGHPagesBranchviaGithub的提交会不断增加。这确实是gh pages分支上最新的提交,并且在执行rebase时可能会被重新附加,但问题似乎是某些东西导致了合并的要求,而它们应该是快进的


我非常确信,如果我做对了,使用rebase我可以生成一个日志,其中每个主控提交都在gh页面中复制,而不是使用merge,其中每个主控提交都在gh页面中创建合并提交,但现在,我必须在不重新设置的情况下进行合并,否则我会陷入这种邪恶的混乱状态。

在提交后挂钩中重新设置基础似乎是个糟糕的主意。为什么您想要这个,为什么您认为它总是可以进行快速转发的提交?就像我说的,我不确定:很明显,我不应该对已经推送的分支重新设置基础。所以我不知道为什么人们会建议用这种方法来保持gh页面的最新。我只是假设这些写博客的人知道他们在做什么。我在这里找到了建议:可能是你找到别名的地方,以防你在找它我认为这可能是相关的。如果gh页面总是在母版之后,也就是说,母版到gh页面的合并将始终是一种快进合并,也许将钩子更改为合并而不是重新基址会起作用。
*   463703d - (HEAD, gh-pages) Merge branch 'gh-pages' of github.com:unphased/ply into gh-pages (2 minutes ago) <Ste
|\  
| *   ef1a304 - (origin/gh-pages) Merge branch 'gh-pages' of github.com:unphased/ply into gh-pages (8 minutes ago) <
| |\  
| | *   2d0c8a1 - Merge branch 'gh-pages' of github.com:unphased/ply into gh-pages (26 minutes ago) <Steven Lu>
| | |\  
| | | *   840df78 - Merge branch 'master' into gh-pages (68 minutes ago) <Steven Lu>
| | | |\  
| | | * \   7db37cc - Merge branch 'master' into gh-pages (7 hours ago) <Steven Lu>
| | | |\ \  
| | | * | | 17f3dbc - Create gh-pages branch via GitHub (24 hours ago) <Steven Lu>
| | |  / /  
| | * | | 48bdf22 - Create gh-pages branch via GitHub (31 minutes ago) <Steven Lu>
| * | | | d15c161 - Create gh-pages branch via GitHub (9 minutes ago) <Steven Lu>
* | | | | 7024a62 - Create gh-pages branch via GitHub (4 minutes ago) <Steven Lu>
* | | | | f61b62d - (master) hopefully stuff calms down (4 minutes ago) <Steven Lu>
|/ / / /  
* | | | 05c26a5 - (origin/master, origin/HEAD) some more progress (9 minutes ago) <Steven Lu>
|/ / /  
* | | 20c6bdb - some progess on the touchmove event handler finally. hopefully this one will run the post-commit hoo
* | | d1ab53e - commented out touchmove log.. testing the auto-rebase on gh-pages (45 minutes ago) <Steven Lu>
| |/  
|/|   
* | 15fe88d - small update to js (70 minutes ago) <Steven Lu>
|/  
* 6b5ee18 - updating note about mutation events' (7 hours ago) <Steven Lu>
* 1b43564 - okay now about ready to start assembling offsets. [snip]
$ git commit -a -m"hopefully stuff calms down"
Switched to branch 'gh-pages'
First, rewinding head to replay your work on top of it...
gApplying: Create gh-pages branch via GitHub
iApplying: Create gh-pages branch via GitHub
Using index info to reconstruct a base tree...
<stdin>:985: trailing whitespace.

<stdin>:1019: trailing whitespace.
article, aside, canvas, details, embed, 
<stdin>:1020: trailing whitespace.
figure, figcaption, footer, header, hgroup, 
<stdin>:1031: trailing whitespace.
article, aside, details, figcaption, figure, 
<stdin>:1055: trailing whitespace.
  line-height: 1.5; 
warning: squelched 27 whitespace errors
warning: 32 lines add whitespace errors.
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: Create gh-pages branch via GitHub
Using index info to reconstruct a base tree...
<stdin>:985: trailing whitespace.

<stdin>:1019: trailing whitespace.
article, aside, canvas, details, embed, 
<stdin>:1020: trailing whitespace.
figure, figcaption, footer, header, hgroup, 
<stdin>:1031: trailing whitespace.
article, aside, details, figcaption, figure, 
<stdin>:1055: trailing whitespace.
  line-height: 1.5; 
warning: squelched 27 whitespace errors
warning: 32 lines add whitespace errors.
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 1 commit.
[master f61b62d] hopefully stuff calms down
 1 files changed, 2 insertions(+), 1 deletions(-)