First, fork the upstream project on github.com into your own domain. Then get the clone URL from your newly forked repo in your domain, and clone the repo to your local environment:
git clone email@example.com:macolo/django-cms.git
Then add the upstream repository as second remote:
git remote add upstream firstname.lastname@example.org:django-cms/django-cms.git
Then switch to the upstream branch that you would like to eventually merge into:
git pull upstream develop
git checkout develop
git checkout --track upstream/develop
From that fresh, up-to-date branch you can now create your own “feature” branch:
git checkout -B mario-test
Now you can make your changes on the
mario-test branch (in an editor). Then show a list of your changes:
If you are happy, then add the changes to the “stage”:
git add .
Check again (stuff has now turned green = added to stage)
Now you are ready to prepare a commit:
git commit -m "speaking short description of the changes, also links to the issue will work magically"
You can create several commits locally.
You can now push this commit or commits on your local feature branch to your remote forked repo:
git push origin
Now you can go to github.com to your forked repo and create a Pull Request to a branch in your upstream repository, from your feature branch in your forked repo.