= Android and Github = How to use github for android developmen == Local manifest == In .repo create a file called local_manifest.xml to replace the original parts with your github forks. It should look like: {{{ }}} == Local branch and push == Create your local branch to work on: {{{ git remote add origin git@github.com:guhl/android_frameworks_base.git git remote show origin }}} If the remote branches are not shown as tracked do: {{{ git fetch git remote show origin }}} Checkout a branch {{{ git checkout -b jb origin/jellybean }}} Now you can work on your local branch jb and push to the remote origin/jellybean == Update from original repo == Create a remote for the upstream: {{{ git remote add upstream git://github.com/Andromadus/android_frameworks_base.git }}} Fetch the remote {{{ git fetch upstream }}} Merge the changes {{{ git merge upstream/jellybean }}} === Update the fork from the local merge === Syntax is: {{{ git push {remote} {localbranch}:{remotebranch} }}} which is in my case {{{ git push origin jb:jellybean }}} == Patches == === create patch from uncommitted stuff === Write down die Hash of the last commit do a temporary commit. create the patch for the temporary commit: {{{ git format-patch -1 }}} reset the temporary commit: {{{ git reset --mixed }}} === Check and apply patch === Check the patch: {{{ git apply --check }}} Apply the pathc with am (that allows to sign off the patch) {{{ git am --signoff }}} === apply a patch an make it uncommitted === On the receiving side apply the patch as described above and the reset to the last commit before the patch using the "git reset --mixed " again