creating pull requests between two separate github repos

I had a need to maintain a public github repository for the purpose of a Jekyll site.  The site will be used for an internal communications mechanism.  The repository is public, but only a handful of collaborators will be allowed direct access to the repository.  Everyone within the company will have the option to fork and pull-request if they desire changes to the content/structure.

Unfortunately, Jekyll does not provide a clean mechanism to prevent the early release of content.  Basically, if the content is created... anyone forking the repository will be able to consume the data.  Not the desired outcome.

So... I decided to keep the public repository with minimal collaborators and the ability to fork/pull-request.  In order to prevent the early release of data/content... I have adopted the creation of a private repository, only accessible by the collaborators (the same few as the public repository).  Work will be committed to the private repo and pull requests will be created to migrate content from private to public repo.  This is not a common workflow, at least not one that I would call common.

Here is how I accomplished this...

------------------------------------------------------

before you proceed... I would highly recommend you install 'hub'... assuming you are utilizing brew... you can install via -> brew install hub.  I would also recommend putting an alias within your 'profile' (alias git=hub)

------------------------------------------------------

from this point forward, all of our changes should be made within the 'private' repository

Clone the private repo so you can work on it:

git clone https://github.com/ACCOUNT_NAME/private_repo.git
cd private_repo
git checkout -b [branch_name]
[make some changes]
git commit
git push origin [branch_name]
git pull-request            --- this will create the pull request on github... from your branch to 'gh-pages'

someone will need to merge the pull-request within the private repo (rinse and repeat)

Note: we should not be pulling changes from 'public-repo'... it is possible, but
we should consider 'public-repo' as the production release and we should only apply pull-requests to this repository.

------------------------------------------------------
when we are ready to publish to the world... create a pull request private repo -> public repo

git clone https://github.com/ACCOUNT_NAME/public-repo.doc
cd public-repo
git remote add private_repo https://github.com/ACCOUNT_NAME/private-repo.git
git checkout -b [branch_name]
git pull private_repo master
git push origin [branch_name]
git pull-request

*** 'git pull-request' is dependent on 'hub' installation
*** follow these steps each time, but DO NOT execute the 'remote add' after the first time

Error: Operation already in progress for pkg-config

Error: /Stage[main]/Main/Node[default]/Package[openssl]/ensure: change from absent to present failed: Execution of 'brew install openssl --appdir=/Applications --force' returned 1: Error: Operation already in progress for pkg-config

Another active Homebrew process is already using pkg-config.

Please wait for it to finish or terminate it to continue.

Here is the solution.

rm $(brew --cache)/Formula/*