Windowspython
windows系统须要本身下载一个安装包git
https://git-scm.com/downloadsgithub
macwindows
mac本机自带git环境ssh
git init # 初始化本地git仓库
执行以上命令会在本地生成一个.git文件,只有这个.git文件存在才能进行git相关操做。(.git是一个隐藏文件)code
ssh-keygen -t rsa -C '帐号'
ssh -T git@github.com # 验证认证
git config --global user.name "your name" git config --global user.email "your_email@youremail.com"
git add . # 添加所有内容 git add 文件路径。# 添加具体文件 git commit -m '描述信息' git remote add origin '项目路径' # git push -u origin master # 提交到远程master分支