Github Integration: "Branch isn’t a valid theme"

Rockethouse
Tourist
3 0 1

Getting this error for a theme that I know is perfectly valid because I can upload it just fine as a zip or using the old theme-kit cli tool.

I'm using a git worktree branch for my built theme directory and was able to successfully load this into another store, but not on this particular one.

There is no documentation or extended information on why the branch or theme may be invalid, so how are you meant to debug this?

Replies 10 (10)
Anonymous
Not applicable
1984 0 0

Hey Im not sure if anyone is still having this issue but maybe this will help. Once you Initialize your theme and then name your theme via the shopify cli, make sure you change directories so that you are inside of that theme folder you named earlier and then try pushing to your empty respository on github. Inside your actual theme folder first run shopify theme check (You shouldn't have a whole bunch of errors and missing folders, only 1 offense, if you get 100s of offenses then you most likely aren't in your actual theme folder) . Next run  git init, git remote add origin yourrepositorylinkgit add . , git commit -m "initial commit lol" . For the last step i opted to use git push origin master. Let me know if this helped anyone.

 

In conclusion you want to make sure you are pushing your actual theme folder to the empty respository and not its parent directory(folder).