How can I create a shallow clone of a single branch that can be pushed to a new remote and later be reintegrated into the original remote?
I need to send code to a customer. That customer wants to make changes that I need to integrate into my code base later. However, I cannot give the customer a full clone.
I can create a clone that is exactly what I want the customer to have.
git clone --branch customer-release --depth 1 url
I can remove my remote, make commits on a new branch (as the customer would do), add my remote again, and push the customer branch for integration onto my remote.
However, I cannot push the shallow clone onto a newly created remote (as the customer would want to do).
I experimented with orphan branches and rebasing but was ultimately unsuccessful.