新疆项目
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"