1.下载git客户端安装,window下载地址:https://git-for-windows.github.io/
2.创建git账号,网址:https://github.com ,然后创建start a project,创建自己的public repositories
3.本地文件夹要上传的项目文件目录,作为本地仓库地址,右键-Git Bash here启动git客户端
4. 创建本地仓库
echo "# lexuetest" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/sea/lexuetest.git git push -u origin master
5.把本地仓库配置链接git仓库,push文件上传git remote add origin https://github.com/sea/lexuetest.git git push -u origin master
6.修改本地的git配置,将repositories的名称修改,以及配置自己账号邮箱,命令如下:
git config --global user.name "lexuetest"
git config --global user.enail "ys@sina.com"
7.下载git辅助工具TortoiseGit,还有汉文包,方便图形化操作提交拉取等操作,下载地址:https://tortoisegit.org/download/
8.开启git之旅,有遇到问题后,再补充。
主要顺序分以下4部:init--添加到本地--提交到本地--push到远程git
git init -- git add . -- git commit -a -- git push origin master