Can someone help me with below issue:
I cloned data from my professor Git url and trying to set my private account has upstream master and push the code in my private repository (https://github.com/accountid/reponame').
When I git checkout -b branchname
, it is creating a new branch in my professors repo not in my account I want to create a master in my private repo.
But I am getting the below error:
[rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/accountid/reponame'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
How can I push to my private repository?