官网地址:https://github.com/
注册账号:输入个人账号:pythonlinan
输入个人邮箱:linanyx123@163.com
输入个人密码:此处略
创建仓库:
1.创建account,点击下一步。
2.创建仓库,填写仓库名称studypy,仓库描述信息。没交钱只能选择public公共仓库类型,付费创建个人拥有的私人仓库。
3.安装git windows客户端
4.这是ssh-key
ssh-keygen -t rsa -C "linanyx123@163.com"
ssh -T git@github.com 检测设置是否成功
5.初始化git远程仓库信息
git config --globel user.name "pythonlinan"
git config --globel user.email "linany123@163.com"
#添加远程地址
git remote add origin git@github.com:pythonlinan/studypy.git
6.上传之前要将远程仓库同步到本地保持版本一致
#远程仓库同步到本地仓库
git clone git@github.com:pythonlinan/studypy.git
7.上传下载代码
#上传代码
touch linan.py
echo "this is the first commit !">>linan.py
git add linan.py
git commit -m 'first commit'
git push origin master
#下载代码
git pull origin master