Sample process to add all the remotes related to an up to date kernel for leeco_msm8996
$ git clone -o github [email protected]:Iolaum/kernel_leeco_msm8996.git
# ...
$ cd kernel_leeco_msm8996/
# Add AICP repo
$ git remote add aicp https://github.com/AICP/kernel_leeco_msm8996.git
# Add main linux kernel repo
$ git remote add kernel https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
# see linux 3.18 tree
$ git ls-remote --heads kernel | grep x-3.18
6b1ae527b1fdee86e81da0cb26ced75731c6c0fa refs/heads/linux-3.18.y
$ git fetch kernel
$ git switch -c linux-3.18.y --track kernel/linux-3.18.y
$ git push github linux-3.18.y
# ...
To github.com:Iolaum/kernel_leeco_msm8996.git
* [new branch] linux-3.18.y -> linux-3.18.y
$ git status
On branch linux-3.18.y
Your branch is up to date with 'kernel/linux-3.18.y'.
# ...
# Add code aurora forum kernel sources
$ git remote add caf https://source.codeaurora.org/quic/la/kernel/msm-3.18
$ git fetch caf
# Checkout on specific commit specified by tagged release
$ git checkout LA.UM.8.6.r1-02600-89xx.0
# git checkout 03ae6f70557f000f7a6ae11446f3a6795cdf27d8 would also work
$ git log
# Our tag comes from the caf/kernel.lnx.3.18.r41-rel remote
$ git switch -c kernel.lnx.3.18.r41-rel --track caf/kernel.lnx.3.18.r41-rel
# push tag to github remote
$ git push github LA.UM.8.6.r1-02600-89xx.0
# Adding Google's android kernel sources
$ git remote add android https://android.googlesource.com/kernel/common
$ git fetch android
# we want to track the android-3.18 branch that will receive further maintenance updates
$ git switch -c android-3.18 --track android/android-3.18
$ git push github android-3.18
# At the end we are tracking the following remotes
$ git remote -v
aicp https://github.com/AICP/kernel_leeco_msm8996.git (fetch)
aicp https://github.com/AICP/kernel_leeco_msm8996.git (push)
android https://android.googlesource.com/kernel/common (fetch)
android https://android.googlesource.com/kernel/common (push)
caf https://source.codeaurora.org/quic/la/kernel/msm-3.18 (fetch)
caf https://source.codeaurora.org/quic/la/kernel/msm-3.18 (push)
github [email protected]:Iolaum/kernel_leeco_msm8996.git (fetch)
github [email protected]:Iolaum/kernel_leeco_msm8996.git (push)
kernel https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ (fetch)
kernel https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ (push)