# [Q] How do I push AOSP Commits to Github



## MyComputerDoctor (Jun 10, 2011)

I am trying to figure out how to push local changes I have made to my AOSP "Jellybean" branch on Github. Basically, I forked CM and made local changes which seemed to compile and function correctly. Now I want to push those changes back to my Github Repository. The branch I have synced in called Jellybean.

Things I have already done:

- Created my SSH Keys and configured in Github
- Initialized the Repo
- Synced the Repo
- Made local changes (which can be reverted if necessary)
- Complied and tested on Galaxy Nexus device

Now that I have the commits (I will be making more), how do I commit the changes using Repo command? or do I use the Git command?


----------



## jt1134 (Jun 9, 2011)

git remote add github [email protected]:yourusername/nameofyourrepo.git

git push github jellybean

Sent from my SCH-I500 using RootzWiki


----------



## JBirdVegas (Jun 11, 2011)

git add -A; git commit -m 'sweet new feature'; git push


----------



## MyComputerDoctor (Jun 10, 2011)

jt1134 said:


> git remote add github [email protected]:yourusername/nameofyourrepo.git
> 
> git push github jellybean
> 
> Sent from my SCH-I500 using RootzWiki


It keeps informing me that "fatal: Not a git repository (or any of your parent directories): .git

I know when you do the repo init that the system creates a .repo directory, but at what point do you initialize git? Also, how is it is possible to upload a whole new android base to github without forking it from someone else?

Josh


----------



## MyComputerDoctor (Jun 10, 2011)

JBirdVegas said:


> git add -A; git commit -m 'sweet new feature'; git push


It keeps informing me that "fatal: Not a git repository (or any of your parent directories): .git

See above post...

Josh


----------



## jt1134 (Jun 9, 2011)

MyComputerDoctor said:


> It keeps informing me that "fatal: Not a git repository (or any of your parent directories): .git
> 
> I know when you do the repo init that the system creates a .repo directory, but at what point do you initialize git? Also, how is it is possible to upload a whole new android base to github without forking it from someone else?
> 
> Josh


You need to be in the actual directory you're working in, like frameworks/base, or whatever.

Sent from my SCH-I500 using RootzWiki


----------



## MyComputerDoctor (Jun 10, 2011)

jt1134 said:


> git add -A; git commit -m 'sweet new feature'; git push


So I think I FINALLY got things figured out. For others who might not understand how GIT works with Android I plan on writing a tutorial so others can understand. Thanks again fella for everything!

*Edit:*

*Here is the tutorial I composed on my steps for committing Android Source to GITHUB.*


----------

