Cookra
Cookra

Reputation: 78

Pulling all content on from new Git --Bare

This is what we have

  1. Existing website, fully functional and working
  2. Added a new --bare repo to a folder outside of public_html (for example deploy.git)
  3. We use hooks and can push to the public_html using post-recieve
  4. I can't pull all files, only the ones added after the --bare was created (this makes perfect sense to me)

Question

What would be the process to add all of our production files to the repo?

Or have we made a cascade of errors?

Upvotes: 0

Views: 39

Answers (1)

Jeff Richards
Jeff Richards

Reputation: 2140

For bare repos it is possible to commit directly to a bare repos but the process in pretty involved see committing to a bare git repository.

For your situation I would suggest that you would be best served by simply copying the whole public_html folder to a location where you can add it to your cloned git repo and then push that to the bare repo. So you would do the following

git clone YOUR_CURRENT_BARE_REPO
(Copy all the files from production into the folder)
git add *
git commit -m "adding production base"
git push origin master

Then you've got all your files in place in your bare repo and you and others can continue development from there.

Upvotes: 1

Related Questions