I'm trying to push code to my branch and I haven't made any commits to the branch previously. git add and git commit work fine but when I do git push, I get the following error:
fatal: The current branch my_branch has no upstream branch. To push the current branch and set the remote as upstream, use
git push --set-upstream origin my_branch
When I run the suggested command, I get another error:
fatal: my_branch cannot be resolved to branch
I tried git pull too and that works fine but when I do git pull specifically for my branch like, I get another error:
git pull origin my_branch
fatal: couldn't find remote ref my_branch
Thanks in advance:)