I am quite new to Git. I have a bitbucket repo that I need to work on. The workflow is such that I have to create a new branch on the remote, and then pull that down locally. Lets say the remote branch is named new_branch. This what I am doing:
git init
git pull repo new_branch
# edit files
git add .
git commit -m "some changes"
Form here, I am confused as to how to proceed. I am not creating a branch locally, just working on master. I need to push the changes to and only to remote new_branch. Do i do
git push origin new_branch
Unfortunately, this gives me the error
error: src refspec new_branch does not match any.
error: failed to push some refs to 'origin'
Please tell me what I am doing wrong here. Thanks.