I cloned the repo at https://github.com/railstutorial/sample_app_rails_4 and made a lot of changes to it (I used it as a starting point for my own app), and now I would like to
GitHub: git clone
someone else's repository & git push
to your own repository
I'm going to refer to someone else's repository as the other repository.
Create a new repository at github.com. (this is your repository)
Clone the other repository to your local machine. (if you haven't done so already)
git clone https://github.com/other-account/other-repository.git
Rename the local repository's current 'origin' to 'upstream'.
git remote rename origin upstream
Give the local repository an 'origin' that points to your repository.
git remote add origin https://github.com/your-account/your-repository.git
Push the local repository to your repository on github.
git push origin master
Now 'origin' points to your repository & 'upstream' points to the other repository.
git checkout -b my-feature-branch
.git commit
as usual to your repository.git pull upstream master
to pull changes from the other repository to your master branch.