很简单,熟悉之后一、2分钟就搞定了。html
1. 建立远程项目路径,git
1.1填入项目名称,github
1.2选择导入仓库,项目地址不用写;apache
以下图所示:post
2. 在本地git项目中添加远程仓库,上传spa
2.1 添加远程仓库,.net
git remote add <自定义remoteName> https://coding.net/yourusername/projectname.gitcode
2.2 push本地文件htm
git push --set-upstream <自定义remoteName> masterblog
搞定。
另外:
若是你的本地项目未曾用git初始化,也不曾提交过修改,就会爆出如下错误:
error: src refspec master does not match any.
这时,你须要先进行初始化:git init
将改动添加到暂存区:git add .
而后提交到本地仓库: git commit -m "your comment"
这样就能够push了。
git相关命令:
查看远程仓库配置:git remote -v
删除远程仓库配置:git remote rm <remoteName>
……
refs: