Download a new project in github repo?


I have a android project, I am working on and it, currently does not reside on a source control of any type.

I have created my own github account and created a repository there and now i want to commit and push my android project into that repo.

how do i do that?

I have tried doinga git checkout and it doesnt work and says that the project is not a git repo.

fatal: Not a git repository (or any of the parent directories): .git

Any suggestions?

You need a local git repository you can sync first. Enter your base source folder and type:

git init

This initializes a new git repository. Then you need to commit your code.

git add *
git commit -m "Initial commit"

Now you can sync it. For this you have to add a remote repository to your local repository.

git remote add origin

Once you have done that, you can push your local files with:

git push origin master

Where origin is the name of the remote repository and master the name of the branch.

Ps.: You'll also have to sync the SSH keys for this to work.

Edit: If you are not sure what that means, head directly to the Github bootcamp: