I'm trying to fork a large repository and I really don't care about most of the history from the upstream repository, just the tips of a couple branches that I want to branch off for my own purposes. Using a shallow clone is sufficient locally but then I can't push it to another repository. I also may need to fetch newer changes from the upstream repository but I will never push my changes upstream.
How can I clone a repository that can be pushed and truncate it to the tips of multiple branches and still be able to merge newer upstream commits without having to reintegrate all the history?