I have a friend who has a repository in his GitHub account. I want to contribute (pull/push) to the master branch (the only branch) on that repo directly.
How would
Since you specified that you want to push directly to your friend's repo, your friend needs to add you as a collaborator in the repo settings.
However, given your inexperience with git
, it would be better to take the indirect approach: fork the repo and use pull requests to move your changes into the main repo.