Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question regarding commiting patterns #15

Closed
abea opened this issue Mar 28, 2016 · 3 comments
Closed

Question regarding commiting patterns #15

abea opened this issue Mar 28, 2016 · 3 comments

Comments

@abea
Copy link

abea commented Mar 28, 2016

I'm starting our first project using Pattern Lab and I can't tell what I should commit for my team. The Twig build came with a .gitignore file that had the following:

.DS_Store
composer.lock
config/*
export/*
packages/*
public/*
source/*
vendor/*

It seems that at the very least, source/* should be committed if this is to be shared and multiple devs are to contribute. It also seems that config, packages, and vendor are needed for building correctly. I'm not sure what export is.

In public, I'm pretty sure I can ignore everything since it does seem to all build just fine from scratch. We can build on individual local machines as well as on the server.

So is this more like what should be ignored? For a team working on it together?

.DS_Store
composer.lock
public/annotations/
public/css/
public/images/
public/js/
public/patternlab-components/
public/patterns/
public/
public/favicon.ico

Is there another workflow that I'm missing? If there's a resource about this somewhere I haven't been able to find it but I'd be happy to simply be pointed there.

Also posted to SO after posting here since I'm not sure of the level of activity here. Will update here if there's a response there.

@abea
Copy link
Author

abea commented Mar 28, 2016

If I'm correct that really only the public directory contents are rebuilt, I'd really be interested to know why the default .gitignore file ignores all the others. Can't tell if I'm missing something.

@dmolsen
Copy link
Member

dmolsen commented Mar 29, 2016

@abea -

The .gitignore is primarily focused on folks who use Composer to build or update their projects. If you downloaded the zip and expect that to be your own true copy then you're correct, a fair bit of the .gitignore can be removed.

packages/ and vendor/ can definitely be removed in that scenario. They get created by the Composer build process. Just note that you'll only want one member of your team running Composer update and pushing changes to the repo. Anything else could get really messy.

Adding config/ and source/ was probably overkill on my part. It's more to make sure I don't accidentally commit something but that's not going to happen in my dev environment anymore. Feel free to take them out. I'll remove them in the future too.

I'd leave export/ in as it's similar to public/. It's just a place to export clean patterns to and wouldn't need to be tracked. That's a new and undocumented feature.

This stuff isn't documented anywhere yet so I apologize that you're having to hack your way through all of the repos to piece it together. Thanks for asking.

@dmolsen dmolsen closed this as completed Mar 29, 2016
@abea
Copy link
Author

abea commented Mar 29, 2016

Excellent! This is super helpful. Thanks, Dave. I haven't found a good post about any Pattern Lab git workflow, so I'll probably write up a post and credit your response here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants