Git和GitHub
Git
git config -l
git config --system --list
添加文件
git add files
git clone
创建
git init
查看
git status
添加上传三连
git add .
git commit -m ‘提交信息’
git push
完整思路
首先创建用户名和邮箱
git config --global user.name “名字”
git config --global user.email “邮箱”
会创建在C:\Users\YouGet\下的
名字叫 .gitconfig 文件
YouGet(默认Admin)
判断是否安装ssh
ssh
ssh-keygen -t rsa
生成秘钥过程,输入两次密码
秘钥在C:\Users\YouGet\ .ssh\
复制 id_rsa.phb文件内的秘钥
登录github
头像—Settings
SSH and GPG keys
New SSH key
在key里面粘贴秘钥
验证密码
绑定就完成了
克隆文件到仓库
git clone 地址
然后自行添加 / 修改 文件
上传三连
git add .
git commit -m ‘注释’
git push -u origin master
令牌问题
登录github
头像—Settings
Developer settings
Personal access tokens(个人访问令牌)
Generate new token
设置信息,建议全勾上,永不过期,减少麻烦。
提交后保存好令牌代码
git remote set-url origin https://<your_token>@github.com//.git
将<your_token>换成你自己得到的令牌。<USERNAME>是你自己github的用户名,<REPO>是你的项目名称
git remote set-url origin https://<your_token>@github.com/YouGet0523/AGuo.git

浙公网安备 33010602011771号