将本地已有的create-react-app创建的项目上传到git上

将本地已有的create-react-app创建的项目上传到git上

1.在git上面创建一个 repository

点击new按钮,创建 repository,创建的时候只填写Repository name和Description ,不要勾选创建README和gitignore。因为create-react-app创建的项目里面已经初始化了README和.gitignore
在这里插入图片描述

2.打开本地项目目录,把当前目录下的已有文件全部加到刚刚新建的git仓库中

git add .

3、提交加入的文件,并书写描述信息

git commit -m "push new files"

4、将本地仓库与远程仓库关联起来

git remote add origin 远程仓库地址

5、把本地仓库的内容push到远程仓库

git push -u origin master
发布了38 篇原创文章 · 获赞 6 · 访问量 8567

猜你喜欢

转载自blog.csdn.net/qq_36400206/article/details/103624452
今日推荐