======================注册账户以及创建仓库===================
要想使用github第一步当然是注册github账号了, github官网地址:
https://github.com/。 之后就可以创建仓库了(免费用户只能建公
共仓库),Create a New Repository,填好名称后Create,之后会
出现一些仓库的配置信息,这也是一个git的简单教程。
Github 安装
下载 git OSX 版
下载 git Windows 版
下载 git Linux 版
配置Git
首先在本地创建ssh key;
$ ssh-keygen -t rsa -C "your_email@youremail.com"
后面的your_email@youremail.com改为你在github上注册的邮箱,之
后会要求确认路径和输入密码,我们这使用默认的一路回车就行。成
功的话会在~/下生成.ssh文件夹,进去,打开id_rsa.pub,复制里面
的key。回到github上,进入 Account Settings(账户配置),左边
选择SSH Keys,Add SSH Key,title随便填,粘贴在你电脑上生成的key。
=======================================
在linux上创建用户及邮箱192.168.44.100
[root@localhost ~]$ git config --global user.name "your name"
[root@localhost ~]$ git config --global user.email "your_email@youremail.com"
[root@localhost ~]# git clone git@github.com:guoqingyangzz/repotest.git
Cloning into 'repotest'...
Warning: Permanently added the RSA host key for IP address
'52.74.223.119' to the list of known hosts.
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.
[root@localhost ~]# cd repotest
[root@localhost repotest]# ls
README.md
[root@localhost repotest]# touch index.html
[root@localhost repotest]# echo "this is git test" > index.html
[root@localhost repotest]# git add index.html
[root@localhost repotest]# git commit -m "frist test" index.html
[master 2efcf80] frist test
1 file changed, 1 insertion(+)
create mode 100644 index.html
[root@localhost repotest]# git push origin master
Warning: Permanently added the RSA host key for IP address
'13.250.177.223' to the list of known hosts.
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 286 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:guoqingyangzz/repotest.git
e149849..2efcf80 master -> master
登陆github查看提交内容
注册账户以及创建仓库
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
相关阅读更多精彩内容
- 下面选了最近十年里,十位名人所做的毕业演讲。那么多的故事与经历,其实只想告诉你一件事: 面对迷茫和不确定的未来,我...
- 一、pod 相关指令 新上架的pod 代码 不能search到解决方案 1.更新仓库 : pod setup2.删...
- 开宗明义spring cloud 为开发人员提供了快速构建分布式系统的一些工具,包括配置管理、服务发现、断路器、路...
- 杨幂曾经在采访中爆料自己名字是邻居起的,当时还差点被取名“杨洋”,不得不感谢邻居,不然这名字可能要毁两位新星了。 ...