-
For the very first time if you didn't configured remote repository then do it using this command.
git remote add upstream git@github.com:joomla/joomla-cms.git
-
Fetch changes from remote repository.
git fetch upstream
-
Configure local working branch:
git branch <new_local_branch_name> upstream/master git checkout <new_local_branch_name>
or
git merge upstream/master
-
To Commit local branch
git commit -a -m "Your commit message"
-
Push you local branch on your Github Repository.
git push origin <new_local_branch_name>
If you want to push your local branch into new remote branch then
git push origin <new_local_branch_name>:<remote_branch_name>
git checkout -- .
git reset --hard
-
Download the patch to your working directory. Apply the patch with the following command:
git apply -v [patchname.patch]
-
To avoid accidentally including the patch file in future commits, remove it:
rm [patchname.patch]
rm `find -name '*.orig' | xargs`
It is because you are using SSH url and didn't added your public key in your Github settings https://github.com/settings/ssh. You can create SSH keys using https://help.github.com/articles/generating-ssh-keys/ guide.