本地文件夹变远程仓库并且提交Github
Posted Sunsin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了本地文件夹变远程仓库并且提交Github相关的知识,希望对你有一定的参考价值。
//初始化本地仓库
$ git init Initialized empty Git repository in C:/Users/root/Desktop/vue-music/.git/ [email protected] MINGW64 ~/Desktop/vue-music (master)
//添加README.md 描述文件 $ git add README.md [email protected] MINGW64 ~/Desktop/vue-music (master)
//提交到本地仓库 $ git commit -m "frist commit!" [master (root-commit) f0b9293] frist commit! 1 file changed, 21 insertions(+) create mode 100644 README.md [email protected] MINGW64 ~/Desktop/vue-music (master)
//推送到远程仓库 $ git remote add origin https://github.com/Sunnshino/vue-music.git [email protected] MINGW64 ~/Desktop/vue-music (master)
//推送到主分支 $ git push -u origin master Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 514 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To https://github.com/Sunnshino/vue-music.git * [new branch] master -> master Branch master set up to track remote branch master from origin.
以上是关于本地文件夹变远程仓库并且提交Github的主要内容,如果未能解决你的问题,请参考以下文章