Why is git subtree missing commits?

大城市里の小女人 提交于 2019-12-01 16:43:42

问题


I just ran git subtree split on my master branch but the subtree(dist branch) is missing the last two commits that are on the master branch. I'm not sure what to do here. I haven't run into this before. It's always worked without issue.

Here's what my github network graph looks like(excluding dist):

From the master branch I ran git subtree split -P dist -b dist.

If I run git log from the dist branch it shows the most recent commit is 6d1620a. Where is 17c1f31 and 33dfc67?

Anyone know what's going on here?


More Details Specific to my Scenario

I am using the deployment method used by Yeoman generated projects. Basically meaning that I have an overall project folder within which there is a dev(or app) directory where all development is done and a dist directory which is where the project is built to(via gulp build process). So to deploy I just split the dist directory off into it's own branch and push that to the live server.

Which looks something like this:

gulp
git checkout master
git merge --no-ff dev
git subtree split -P dist -b dist
git push

Alternately git subtree push -P dist origin dist also works.


回答1:


I forgot the run the gulp build process. Because of this the new commit did not affect the /dist directory.

It makes sense that the commit wouldn't be passed on with a directory that was not affected by it. But not knowing this behavior ahead of time really confused the situation for me.



来源:https://stackoverflow.com/questions/24252355/why-is-git-subtree-missing-commits

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!