I was given a repository and commited my initial files there, as I normally would. Unfortunately, the scope of the project changed, and I have to use the same repository, but wipe it and start again with a different base.
I pulled my new base from an existing repository, and have set the remote url to the one of the repo I want to use. After that, I tried to do the following:
git add .
git commit -m "Project base change"
git push -u -f origin master
But I'm getting the following error
error: src refspec master does not match any.
Since this is something I really want to be careful with, I'd like to know the correct way of doing this.
master
, right? – phd Oct 24 '17 at 11:26git show-ref
, and see where it points to? normalgit push origin master
will work. – danglingpointer Oct 24 '17 at 13:29