Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is git subtree missing commits?

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):

github network graph

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.

like image 510
Hal Carleton Avatar asked Jun 16 '14 21:06

Hal Carleton


1 Answers

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.

like image 161
Hal Carleton Avatar answered Nov 01 '22 09:11

Hal Carleton