As a git beginner, I am having the worst time with this. If this question was asked before, then I apologize--but I cannot find any Stack Overflow page that gives me the answer I need. That being said, here is my question:
What are all the steps required to locally push to a branch on GitHub given the branch url? Specifically, how do you make the repo point at the correct location after initialization?
So far I have tried:
git init
git remote add <branch_name> <url_of_branch>
git add .
git commit -m "Message"
git push origin <branch_name>
Along with numerous other attempts. The error message I have been getting is:
error: src refspec <branch_name> does not match any.
error: failed to push some refs to 'git@github.com:<username>/path/to/rep
Thank you for your help!