I have a git repository which I am pushing changes to remote X. Now, I created another git remote (different repository), and I want to push my changes to it as well. Ideally, I would like to keep to two sync. By making changes in one and pushing to the other.
I added the new remote to my git. I made a commit and pushed all changes to one repository (origin) However when I try to push the changes:
git push my-new-remote-origin my_current_branch:master
I get this error :
error: src refspec my_current_branch does not match any
error: failed to push some refs to <NEW_GIT_REPO_ADDRESS>
Is my solution correct? Why is it failing (should I specify the commit to push?)