Search code examples
githubshopifygitignoreshopify-template

What files and folders to include in .gitignore in Shopify Themes Development


I'm new to Shopify Themes Development. I downloaded the free Shopify theme template using Themekit. I want to push the theme to Github but in VS Code it's showing that there are 156 files to be pushed on Github.

Folder names are: assets, config, layout, locals, sections, snippets, templates

File name: config.yml

That's obvious, this is not a way.

Can someone please tell me what files and folders i need to write in .gitignore So that those won't be pushed on Github.

Thanks in Advance!


Solution

  • Shopify has an example .gitignore in their starter theme. I'm not sure why they don't include settings_data.json but I would definitely include it. Here's what I'd use:

    # Shopify #
    ###################
    config.yml
    config/settings_data.json
    
    # OS generated files #
    ######################
    .DS_Store
    .DS_Store?
    ._*
    .Spotlight-V100
    .Trashes
    ehthumbs.db
    Thumbs.db