Git folder issue


Newbie problem I’m afraid just been introduced to git and love it as you all do!

I’ve been following Dave Kiss intro to roots and your docs but it seems when I commit git from the site folder and upload to bitbucket it looks ok but doesn’t include the site folder (obviously because I ddi it within the site folder). everything is in there correctly and when I make changes and commit they are all added correctly.

However when I clone or pull into my laptop to work whilst mobile it does so but the site folder is named the parent folder for example and there is no site folder?

What have I glaringly done so wrong to you git experts?

You can specify a parent folder for git clone after the git url. For example git clone folder-name will clone Bedrock into a folder named folder-name. This is why the Trellis docs include the word “site” in the git clone for Bedrock.

You can read more about git clone options here.

An alternative option would be to git int one directory up so you can include the site directory in your git repo. You could then add a .gitignore file to exclude additional folders or files in that directory you don’t want included in your repo.

1 Like