0

I have forked AOSP (all repos) from the Google's repositories, and I want to:

  1. Keep a copy with my changes in my own Git repositories (for instance, private)
  2. Periodically pull changes from Google's repositories (for instance, aosp)

How should I correctly do it with repo? Repo manifest can contain multiple remotes, but how can I specify, that I want to use aosp only for pulling, and private for both pushing and pulling?

I've already seen this answer, but it doesn't clarify how to sync the forked repository with the original one (and it covers only the case when I'm forking a single repository, not the whole AOSP code).

torek
  • 448,244
  • 59
  • 642
  • 775
artem
  • 16,382
  • 34
  • 113
  • 189
  • How do your forked the AOSP? Where is your repositories? In the github or the private server? – Yong Oct 19 '22 at 08:28
  • @Yong with `repo` to my local machine (not by forking on the GitHub itself), then I've created corresponding private repos on GitHub and now I want to push the code there – artem Oct 19 '22 at 10:13
  • 1
    1. sync code from aosp; 2. use repo forall to push synced code to github: repo forall -c "pwd;git push private remotes/aosp/master:refs/heads/master". So the aosp master will be put in your private github. And you should create an new branch for development. Don't use the branches in aosp, or it will be conflict. A better way is to creating branch with an prefix. For example my/master, or my-master. – Yong Oct 19 '22 at 10:47

0 Answers0