简体   繁体   中英

cvs2git covert cvs to git and push multiple branches gets: error: src refspec master does not match any

I use cvs2git to convert a cvs repo to git. This project/repo has multiple branches and tags. Anyway I was able to (didn't get any error msg) convert this cvs repo to git. But when I push the git project to github I am getting this error. I think it might be I am push it to Master, but I have multiple branches. If that's the case, how can I push multiple branches to github? Thanks!

Here are the commands I ran:

git remote add origin https://github.com/mygithub/MyProject.git
git push -u origin master

Complete Error:
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/mygithub/MyProject.git'.

Do you have a branch named master in your local repository? git branch will show you your local branches.

It might be that you want to do git push --mirror

--mirror Instead of naming each ref to push, specifies that all refs under refs/ (which includes but is not limited to refs/heads/, refs/remotes/, and refs/tags/) be mirrored to the remote repository. Newly created local refs will be pushed to the remote end, locally updated refs will be force updated on the remote end, and deleted refs will be removed from the remote end. This is the default if the configuration option remote..mirror is set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM