Need Help with 'git Cherry-Pick' use and how it is affected on 'Repo Sync'

Search This thread

NeoBeum

Senior Member
Feb 25, 2017
220
80
Hello,

I have an android repo that is init and synced to the 7.0 branch, and I have cherry picked fixes for a few projects.

My question is: if I invoke 'repo sync' does it sync back to the original init 7.0 branch without the cherry-picks for the projects? Everytime I run 'repo sync' to update my manifest, I seem to lose the cherry picked projects.

If so, how do I make my repo remember the changes I have made?

I tried 'repo start'
Code:
repo start 'my-local' --all
But that just seemed to change my original init branch to the "master" android branch, and then proceed to place the projects in to the 'my-local' branch.

https://github.com/NeoBeum/XpeRicoverE5823/tree/suzuran-7.0

Thanks
 
Last edited:

zibiksior

Senior Member
Dec 8, 2009
349
100
Warsaw
Yes, every time you execute repo sync it will sync back to original source. To keep your changes you have to fork manifest and push it to your git account. Than you have to init repo from your git fork of manifest. After that you should fork module you want to modify and charry pick commit. Push changes to your repo. Than modify manifest to download modified module from your repo instead from AOSP etc. You have to specify you remote in manifest and than repo sync. Propably you will have to force sync that particular module.

Look here, there are 3 parts: http://blog.udinic.com/2014/05/24/aosp-part-1-get-the-code-using-the-manifest-and-repo
I found a lot of useful things in that blog.
 

NeoBeum

Senior Member
Feb 25, 2017
220
80
Thanks, yeah, I also got a reply from GitKraken and read how to use submodules. I also found that if you get disconnected, from the internet when doing anything git, sometimes messes up the objects.

I also realised now the reason repo has all projects, so you can make a full production build, and why it breaks when certain projects are removed... Only took 200GB of trial and error