Due to the sheer size and history of AOSP's frameworks_base repository, pushing it to GitHub isn't exactly straightforward. In this guide, I'll walk you through the entire process of pushing the contents of frameworks_base to a GitHub repository.
Let's start with cloning an older version of Android's frameworks_base.
Here, I have cloned:
https://github.com/aosp-mirror/platform_frameworks_base -b nougat-release
Once cloned, push it to the repository you want to push it using HEAD:refs/heads/<branch-name-you-want>
Once we are done with the initial push, we can now fetch the desired revision of AOSP's frameworks_base repo we want to push:
https://android.googlesource.com/platform/frameworks/base <the branch you wanna update to e.g. android-10.0.0_r40>
After the fetch is complete, we will git checkout FETCH_HEAD
and this should give us all the changes we want along with history.
Now, force-push the contents to a Github repository and there you have it!
pero as always