这里写自定义目录标题
一.创建远程仓库
前置条件:需要安装git(https://git-scm.com/downloads)
1.创建gitee账户
https://gitee.com/
2.创建成功后,创建远程仓库,如图所示(图1)
3.在“创建”成功,会展示如下图(图2)
二.VS 创建项目,如下图(图3)
1.根据图2,执行命令
2.执行命令
①git init
②git add .
③git commit -m “首次提交”
④git remote add origin https://gitee.com/showluozexian/zero.-prodution-project.git
⑤git push -u origin “master”
3.添加.ignore文件(推送代码的时候 忽略一些不必要的文件),注:要文件放到.sln同级目录
① 在git命名窗口 创建.gitignore文件
touch .gitignore
②创建后编辑.gitignore文件,编辑内容–全选并复制
https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
③之后运行命名
git rm -r --cached .
git add .
git commit -m “add gitignore”
git push origin master