Jump to content

Git gurus - pull from core, push to private repo?


patzer
 Share

Recommended Posts

Hi folks,

I downloaded PW from its git repo on GitHub. I set up a private repo at Bitbucket to check in and store my local changes. Problem is, .gitignore (from PW's master repo) tells git to ignore site/ (which makes sense for the core application), but that's what I want to track and push to my private repo.

I'd like to keep the PW core in git so I can pull updates from GitHub.

Anyone have a solution to this? Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

On further investigation, I think git submodules is the right way to go.

It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other. 
… 
Git addresses this issue using submodules. Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your project and keep your commits separate.

http://git-scm.com/book/en/Git-Tools-Submodules

I've not tried this yet, but am going to for my next project.

Link to comment
Share on other sites

I've been using the submodule method all day and it seems to work well. I made a soft symlink from /wire to /ProcessWire/wire.

I did have to add an .htaccess file into the /ProcessWire directory like so:

Order deny,allow
Deny from all

Otherwise you could browse to the ProcessWire directory and start the install process in the sub-directory.

Link to comment
Share on other sites

  • 6 months later...

Can you describe Your final configuration in more details? Making wire a submodule is quite trivial, but what about all the other files in the root directory (index.php, .htaccess, .gitignore and any other stuff that might appear in the future versions of PW)?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...