快去自定义签名吧~|

园龄:粉丝:关注:

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

本文作者:youget

本文链接:https://www.cnblogs.com/youget/p/17306661.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   有搞头  阅读(15)  评论(0编辑  收藏  举报  
努力加载评论中...
   
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起