Github安装手册
1.前言
昨天捣鼓eclipse和ant的时候把自己改过的源代码删除了,痛定思痛,决定尝试安装一下github,有了github就可以很方便的进行代码共享和版本控制
2.安装
[hadoop@arionvm1 hive-branch-0.10]$ sudo yum -y install git
3.注册git账号
进入http://www.github.com/注册git账号,选择free的那个,也就是privacy为0的那个,在账户设置里面用邮箱进行激活
4.新建repository并创建公钥
选择新建一个repository,按提示输入相关内容
然后生成公钥
[root@arionvm1 .ssh]# ssh-keygen -t rsa -C thangool@*******
将id_rsa.pub中的内容贴到账户设置的ssh keys中
测试一下
[root@arionvm1 .ssh]# ssh -T git@github.com
显示Hi thangool! You've successfully authenticated, but GitHub does notprovide shell access.
5.提交版本
运行
[root@arionvm1 .ssh]# git config --global user.name "thangool"
[root@arionvm1 .ssh]# git config --global user.email "thangool@ict.ac.cn"
[root@arionvm1 hive-branch-0.10]# git init
[root@arionvm1 hive-branch-0.10]# git remote add origin git@github.com:thangool/my-hive.git
[root@arionvm1 hive-branch-0.10]# git add –f *
[root@arionvm1 hive-branch-0.10]# git commit -m "first commit"
[root@arionvm1 hive-branch-0.10]# git push origin master
6.查看结果
登陆https://github.com/thangool/my-hive可查看结果
本文详细介绍了如何在Linux环境下安装GitHub,并完成账号注册、公钥创建及版本提交等操作流程,帮助初学者快速掌握GitHub的基本使用。
768

被折叠的 条评论
为什么被折叠?



