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
I'm summing up everyone's answer.
Fork
your friend's repository.git clone {URL}
.git checkout -b new_branch
.git remote add upstream {URL}
git add {file name}
or git add .
if you want to add all files.git commit -m "message"
git remote add upstream {URL of friend's repository that you have forked}
git remote -v
git push
Here you have to give your username and password.