Q:

I've cloned from another person's repository, now how do I push the code from my local computer to my own repository?

A couple of weeks ago I cloned a repository to my local computer. I added some code to some of the files. Recently, there were updates to the repository that I want to pull. However, I want to save my progress by pushing to my own repo, but when I do this I create submodules instead of actual folders in git. How can I save my progress before pulling from the updated repo?

A:

You probably want to add a git remote to your local copy and push there:
$ git remote add alexyang https://github.com/alexyang/myrepo
$ git push alexyang master

In this example alexyang is an arbitrary name that will be how you refer to the repository (analogous to "origin", essentially a nickname for the full repo url). https://github.com/alexyang/myrepo is the repo url. master could of course be replaced with whatever branch you want to push.
Once you've committed & pushed your changes to your repo, you can then fetch from the original repo:
$ git fetch origin

And merge in those changes, or continue how you see fit. You will now have 2 references to remote branches, probably named origin/master and alexyang/master. 

