gitee 首次提交本地代码
1、在 Gitee 上新建仓库
2、在本地新建一个空文件夹
3、右击新建的文件夹,单击 git bash here
4、初始化,输入
git init
5、连接远程仓库,输入
git remote add origin + 仓库地址
6、拉取远程 master 至本地,输入
git pull origin master
7、把在本地要上传的代码(根目录,不包括项目名)放在步骤 2 新建的文件夹中,即修改本地文件
8、贮藏文件,根据实际需求输入对应命令
比如:git add .
Summary:
- git add -A
stages all changes - git add .
stages new files and modifications, without deletions - git add -u
stages modifications and deletions, without new files
9、输入描述,输入
git commit -am "描述内容"
10、推送至远程分支,输入
git push origin master