其他分享
首页 > 其他分享> > Vue-cli项目上传至GitHub

Vue-cli项目上传至GitHub

作者:互联网

由于用脚手架创建的项目自带git文件,所以就不需要在将远程仓库先拉到本地再上传,可以直接在vue项目中进行上传,打开git bash
1.初始化仓库

git init

2.将项目暂存到本地仓库中

git add .
git commit -m "描述信息"

4.添加远程仓库路径

git remote add origin https://gitee.com/xxxxxxx

5.push提交

git push -u origin master

如果报错

Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

则强制覆盖分支提交

git push -u origin master -f

标签:origin,git,remote,cli,hint,仓库,Vue,GitHub,push
来源: https://blog.csdn.net/as_64/article/details/122876840