经常会出现这样的情况,本地已经写了一段时间的项目想放到Github上,但是一般的流程是先在Github上创建项目再拉取下来。有一种办法是将已有的项目内容拷贝进去。但是作为开发者有没有更优雅一点的方法呢。
解决方案
使用以下命令:
1. git init
2. git add README.md
3. git commit -m “first commit”
4. git remote add origin git@github.com:dengzhaotai/vlc_play.git
5. git push -u origin master