Github相关资料

新疆项目

echo "# py_odbwr" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:GYbin/py_odbwr.git
git push -u origin master

 

git 常用命令

git commit #项目索引提交
git push origin master #推送本地要远程
git pull origin master #更新远程到本地
git clone git@github.com:username/gitproj.git #获取源码

git config --global user.name "user" #设置名称
git config --global user.email "user@china.com" 设置邮箱
git config --lis #查看配置
git init #创建工程
git add file #生成快照并存入项目索引

 

 

 有一台电脑搭建好github更新, 想在另一台继续使用

先 把github 私钥复制过来 

spc -P123  user@china.cn:/home/user/.ssh/id_rsa ~/.ssh/

将私钥添加到设备中遇到错误:

Could not open a connection to your authentication agent.

百度了一下。用命令 输入命令

ssh-agent bash

添加私钥

ssh-add id_rsa

 

设置 Git名字 和邮箱

git config --global user.name "GYbin"
git config --global user.email "user@china.com"

 

转载于:https://www.cnblogs.com/GYbin/p/8017632.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值