手把手教你github

github

  •  公共的服务器
  •  Github注册 
    • 官网
    • https://github.com/

        注册完成操作以下内容

  • 1.  github.com注册账户
  • 2.   在github上创建仓库

        生成本ssh key        

        ssh-keygen -t rsa -C 'git@github.com:zyx1573zyx'

        -t rsa 表示加密类型是rsa加密

        -c 注释

       邮箱要与github上注册的相同

 ssh-keygen -t rsa -C 'git@github.com'

2.复制 公钥,在github 中添加ssh key

cat .ssh/id_rsa.pub

  • 在github找到账户设置

  • 3.测试本地客户端

yum install git 

  • 4.进行认证(但不能远程连接)

ssh -T git@github.com

  • 5.在本地添加远程仓库用户名

git config --global user.name 'zhaoyaxing'

  • 6.在本地添加远程仓库邮箱

git config --global user.email '3200672008@qq.com'

  • 7.启用默认的颜色设置

git config --global color.ui true

不喜欢花花绿绿的就关了。git config --global color.ui false

  • 8.查看配置
  • git config --list

  • ls .gitconfig

  • cat .gitconfig

  • 9.上传远程仓库
  • mkdir test0913

  • cd test0913/

  •  git init

  • 10.设置远程仓库地址

                查看远程仓库地址

                

git remote add origin git@github.com:zyx1573zyx/test0913.git

echo 111111 > 1.sh

git add .

git commit -m 'git本地第一次提交1.sh'

git push -u origin master

  • 11.克隆远程仓库信息

git clone git@github.com:zyx1573zyx/test0913.git

ls

cd test0913/

ls

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值