创建一个版本库
在AS中新建一个项目
将远程版本库克隆到本地
复制地址
打开git bash切换到项目的工作目录下,并输入:
git clone 复制的地址
将四个文件复制粘贴到上层目录中,.gitignore直接覆盖即可,复制完后将原Recorder目录删除
将现有文件提交到github
git add .
git commit -m "First commit"
git push
采用git push origin master会出错,查了半天资料也没弄懂,最后采用简写的形式git push没想到就成了
出错如下:
$ git push origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/yzy-code/Recorder.git'
解决方式:
git push 弹出对话框输入github账号密码即可