Manage repo locally

Hello

I am able to sync repo locally and able to compile AOSP.

The thing I want to know that how can I add version control locally to my system. and from there I can checkout to another system and manages my local updated AOSP.

@Jigar @jasonl Please help about this question …

@jasonl Can you help me with this?

@Frank can you please help me with this

@Jigar you can use git branch to new a branch of yourself

@jasonl
If i create my own branch then am i able to access or checkout to other system as well ?

yes ,but you should commit your local change before you checkout to other system

@jasonl
from the base directory do i need to create a branch or somewhere else ?

As from the base directory i am getting error like :
fatal: not a git repository

@jasonl
I have created a branch using
repo start “brnach name” command

But not clear what to do next can you help me with the same

@jasonl
can you help me with this?

@jasonl
Can you update this?

Jigar, there are plenty of sites giving basic introduction of using git and github .

I suggest you use those and first try to learn the basics. What you want to do is fairly easy to do, just need to search on Google or stackoverflow.

@Yasir_Javed Thanks for the outstanding suggestion :slight_smile:

The thing I want to know that how khadas manages the repo at thair end so in the future if I want to be mainstream with khadas so I can do it easily.

I think you are being sarcastic. Anyhow, its been a long time since i have left using github, but the basics will be like this.

  1. Khadas maintains a git/repo for lets say fenix. github/khadas/fenix.git

  2. Fork it to your own profile. e.g. my github is neXusPRIME/fenix.git
    image

  3. Now i have 2 options: 1. I can make my changes into the master branch and then make a pull request to khadas/fenix so they can accept my change into their master.
    Otherwise i can start my new branch, lets say instead of master, i create testing branch and make code changes in it which I DONT want to send to khadas, just keep them to me.
    In this case, i will have to merge testing with khadas master manually everytime i need to update. Its called merging with upstream.

  4. Now there can be an issue, lets say in the exact same line of code, i made the cpu govener= conservative in my testing branch and khadas made it =inetractive in their master branch, then when i try to merge, it will give a merge conflict. i will have to manually resolve it and commit it. But if khadas master changes something else which i have not changed in my testing, i can most of the time merge it simply with easy command.

If you want to contribute to khadas/fenix, then i suggest make step by step changes in your fork in master branch and create pull requests to khadas. Once they accept the pull request, you do a git repo sync and both khadas and your fork will always stay the same.
If you want to do some custom stuff in khadas code, i say create a branch in your fork and whenever you want to import the new improvements/commits from khadas code, do a git merge.

I can point you to some guides showing the command usage, but its a learning curve and you have to READ. if you are not willing to READ and test, it will be tough for you.

Tutorials:
https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

If I made some mistakes in concept, please feel free to correct me. I have limited development experience and only ported custom roms and TWRP recoveries to mobile phones previously.

2 Likes