1. 进入项目目录, cd xxxxx 2.进行初始化仓库 git init 3. 将项目所有文件加入到git git add . 4. 提交到git仓库, -m选项备注此次提交的描述说明 git commit -m "项目初始化"