Answers.Body: <p>Each project should be a separate repository, definitely. After that - feel free to include what you like. Personally I follow something like this and ignore my /app folder: <a href="https://deploybot.com/guides/deploy-craft-cms-to-digitalocean" rel="nofollow noreferrer">https://deploybot.com/guides/deploy-craft-cms-to-digitalocean</a>. But you could also include the <code>/app</code> directory and plugins.</p>
  
  <p>Also: <a href="https://craftcms.stackexchange.com/questions/55/git-workflow-and-multi-environment-how-to-approach">Git Workflow and Multi Environment - how to approach</a></p>
  
  <p>And: <a href="https://craftcms.com/support/craft-storage-gitignore" rel="nofollow noreferrer">https://craftcms.com/support/craft-storage-gitignore</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-02T15:34:09.803Z
Answers.Text: Thanks, @darylknight. I would definitely want to include config files (other than config/db.php) and templates, plugins. I wonder how to create that in one repository together with the outward-facing portion of the site, as they reside in different areas of the directory. How would I run a 'git init' in both directories at once? Thanks again.
Answers.UserDisplayName: userAW
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-03T10:29:19.650Z
Answers.Text: My git root is on the same level as /craft and /public. So on your local machine you'd have /sites/domain.dev/ - then /public and /craft inside that folder, which is where your git root is
Answers.UserDisplayName: darylknight
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-03T13:11:30.630Z
Answers.Text: ok, it sounds like I'll have to think about it a little more. i have a general public folder that houses multiple sites and a general craft folder that houses corresponding apps folders for those sites. these are all development sites and sharing the same base url (but completely separate craft installs/cps,etc). since you suggest having separate git repos per project, this wouldn't work with my current configuration. thanks for your help-- definitely enough information to get me thinking.
Answers.UserDisplayName: userAW
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-06T09:44:04.273Z
Answers.Text: Yeah... you should change that. You need a separate folder for each website.
Answers.UserDisplayName: darylknight
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-29T00:51:12.017Z
Answers.Text: We ended up going with a separate folder for each site, as @darylknight suggests. We have been using this setup for 1 1/2 years and everything works very well. Thanks!
Answers.UserDisplayName: userAW
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-02T15:05:11.107Z
Answers.LastActivityDate: 2017-02-03T10:27:11.297Z
Answers.LastEditDate: 2017-04-13T12:51:00.253Z
Answers.UserDisplayName: darylknight
Body: <p>Please excuse this newbie question (newbie to Git that is). I'm trying to set up my CraftCMS environments with Git and wonder about best practices and how others configure your repositories.</p>
  
  <p>In specific, do you have separate Git repos for separate sites, or is it all in one big repo? Do you have separate repos for the outward-facing portion of a single Craft site and its application files or is that all in one repo? </p>
  
  <p>Thank you in advance.</p>
  
Tags: <craft3><git>
Title: Git configuration for CraftCMS
ThreadText: # Git configuration for CraftCMS
  
  (Asked by: username_0 on 2017-02-02)
  
  Please excuse this newbie question (newbie to Git that is). I'm trying to set up my CraftCMS environments with Git and wonder about best practices and how others configure your repositories.
  
  In specific, do you have separate Git repos for separate sites, or is it all in one big repo? Do you have separate repos for the outward-facing portion of a single Craft site and its application files or is that all in one repo?
  
  Thank you in advance.
  
  **Tags:** craft3, git
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-02-02. Score: 5 | Accepted answer
  
  Each project should be a separate repository, definitely. After that - feel free to include what you like. Personally I follow something like this and ignore my /app folder: <https://deploybot.com/guides/deploy-craft-cms-to-digitalocean>. But you could also include the `/app` directory and plugins.
  
  Also: [Git Workflow and Multi Environment - how to approach](https://craftcms.stackexchange.com/questions/55/git-workflow-and-multi-environment-how-to-approach)
  
  And: <https://craftcms.com/support/craft-storage-gitignore>
  
  > **Comments:**
  > **username_0**: Thanks, @username_1. I would definitely want to include config files (other than config/db.php) and templates, plugins. I wonder how to create that in one repository together with the outward-facing portion of the site, as they reside in different areas of the directory. How would I run a 'git init' in both directories at once? Thanks again.  
  > **username_1**: My git root is on the same level as /craft and /public. So on your local machine you'd have /sites/domain.dev/ - then /public and /craft inside that folder, which is where your git root is  
  > **username_0**: ok, it sounds like I'll have to think about it a little more. i have a general public folder that houses multiple sites and a general craft folder that houses corresponding apps folders for those sites. these are all development sites and sharing the same base url (but completely separate craft installs/cps,etc). since you suggest having separate git repos per project, this wouldn't work with my current configuration. thanks for your help-- definitely enough information to get me thinking.  
  > **username_1**: Yeah... you should change that. You need a separate folder for each website.  
  > **username_0**: We ended up going with a separate folder for each site, as @username_1 suggests. We have been using this setup for 1 1/2 years and everything works very well. Thanks!  
  
  ---
  
  