项目上传至Gitee命令步骤
1.gitee中已创建仓库:可以创建私有仓库 或者公开仓库
2. 本地安装好git,鼠标右键会有 git GUI Here 与 Git Bash Here 选项
3. 在项目文件夹下点击 git Bash Here
4.输入命令
4.1 git init
(初始化仓库)
4.2 git remote add origin Gitee仓库的地址
(相当于将本地文件和远程仓库建立连接)
4.3 git pull origin master
(将Gitee上的仓库pull到本地文件夹中)
4.4 git add .
(将项目里的所有文件提交到暂缓区)
4.5 git commit -m '提交信息'
(将暂缓区文件提交到本地仓库)
4.6 git push origin master
(推送到远程仓库)
4.7 git checkout develop
(切换其他分支)
若push项目失败:提示 [rejected] master -> master (fetch first) error: failed to push some refs… 原因是本地没有README.md,执行以下命令将md文件pull到本地
4.8 git pull --rebase master
(将README.md拉到本地)
- 以上命令输入完毕,远程仓库可以查看!