GITHUB(github)初级使用

时间:2023-01-24 12:16:20

Github顾名思义是一个Git版本库的托管服务,是目前全球最大的软件仓库,拥有上百万的开发者用户,也是软件开发和寻找资源的最佳途径,Github不仅可以托管各种Git版本仓库,还拥有了更美观的Web界面,您的代码文件可以被任何人克隆,使得开发者为开源项贡献代码变得更加容易,当然也可以付费购买私有库,这样高性价比的私有库真的是帮助到了很多团队和企业

github使用

1、注册用户
2、配置ssh‐key
3、创建项目
4、克隆项目到本地
5、推送新代码到github

注册:

进入github官网:https://github.com/

GITHUB(github)初级使用

GITHUB(github)初级使用

GITHUB(github)初级使用

GITHUB(github)初级使用

GITHUB(github)初级使用

GITHUB(github)初级使用

[root@localhost git_data]# git remote
origin
[root@localhost git_data]# touch a.txt
[root@localhost git_data]# touch b.txt
[root@localhost git_data]# touch c.txt
[root@localhost git_data]# git add .
[root@localhost git_data]# git commit -m "add abc.txt"
[master (root-commit) 5c3255e] add abc.txt
 3 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a.txt
 create mode 100644 b.txt
 create mode 100644 c.txt
[root@localhost git_data]# git status
# On branch master
nothing to commit, working directory clean
[root@localhost git_data]# git remote remove origin
[root@localhost git_data]# git remote
[root@localhost git_data]# git remote add origin git@github.com:chinansh/github.git
[root@localhost git_data]# git remote
origin
[root@localhost git_data]# git push -u origin master
The authenticity of host 'github.com (13.229.188.59)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
RSA key fingerprint is MD5:16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,13.229.188.59' (RSA) to the list of known hosts.
Counting objects: 3, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 207 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:chinansh/github.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
[root@localhost git_data]# git status
# On branch master
nothing to commit, working directory clean
[root@localhost git_data]# ll
total 0
-rw-r--r--. 1 root root 0 Apr 17 21:44 a.txt
-rw-r--r--. 1 root root 0 Apr 17 21:44 b.txt
-rw-r--r--. 1 root root 0 Apr 17 21:45 c.txt

  GITHUB(github)初级使用

GITHUB(github)初级使用

[root@localhost data]# git clone git@github.com:chinansh/github.git
Cloning into 'github'...
Warning: Permanently added the RSA host key for IP address '52.74.223.119' to the list of known hosts.
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.
[root@localhost data]# ll
total 0
drwxr-xr-x. 3 root root 57 Apr 17 21:58 github
[root@localhost data]# cd github/
[root@localhost github]# ll
total 0
-rw-r--r--. 1 root root 0 Apr 17 21:58 a.txt
-rw-r--r--. 1 root root 0 Apr 17 21:58 b.txt
-rw-r--r--. 1 root root 0 Apr 17 21:58 c.txt

  

[root@git git_test]# touch d

[root@git git_test]# git add .
[root@git git_test]# git commit ‐m "add	d"
[root@git git_test]# git push	‐u origin master
[root@git git_data]# cd /root/git_data/	# 拉取远程仓库最新代码、然后进行上传
[root@git git_data]# git pull

  

GITHUB(github)初级使用的更多相关文章

  1. GitHub & GitHub Package Registry

    GitHub & GitHub Package Registry npm https://github.blog/2019-05-10-introducing-github-package-r ...

  2. git以及github的初级入门(一)

    本身学习git的操作是没什么兴趣的,毕竟原本是win平台学的java开发,git下那么多复制的命令行操作确实比较让人头疼,直到昨天我打开计算机的时候,我放置项目的E盘,以及F盘,G盘盘符都不见了!!我 ...

  3. GitHub的初级使用

    最近准备学习一个GitHub的使用 一.账号创建 1.百度找到GitHub官方网站(https://github.com/ ) 2.点击Sign up注册GitHub账号 下图为注册页面 第一步:填写 ...

  4. [GitHub] GitHub Repositories

    https://github.com/karqical2016/karqical2016.github.io.git https://github.com/karqical2016/java.git ...

  5. [GitHub] GitHub使用教程for Eclipse

    1.下载egit插件 打开Eclipse,git需要eclipse授权,通过网页是无法下载egit的安装包的.在菜单栏依次打开eclipse→help→install new software→add ...

  6. Github/github 初始化教程

    注: 由于将项目迁移到gitee,克隆gitee 的时候出现了问题.不得已,重新配置 ref : https://blog.csdn.net/jingtingfengguo/article/detai ...

  7. [GitHub]GitHub for Windows离线安装的方法

    这几天一直在尝试安装GitHub for windows ,安装程序是从https://windows.github.com/ 下载到的OneClick 部署程序,版本号为2.11.0.5.可能是因为 ...

  8. [Github] Github使用教程

    前言 Github是一个面向开源及私有软件项目的托管平台.它可以免费使用,并且速度快速,拥有超多的用户.是目前管理软件开发和发现已有代码的首选平台.下面将向Github新手介绍相关操作. 正文 注册 ...

  9. GitHub & GitHub Desktop能帮我们做什么

    GitHub: 1.代码版本管理 GitHub Desktop:

随机推荐

  1. MyEclipse:各种提示图标的含义

    1.新建的项目,项目名称前有黄色小警示号的原因, 2.项目名称上有红色叹号,说明缺少jar包,仔细找一下,看看缺了什么,添加进去一般就好了. 3.出现红色叉号,那说明代码错误,需要修改代码.

  2. rpc框架之 thrift 学习 1 - 安装 及 hello world

    thrift是一个facebook开源的高效RPC框架,其主要特点是跨语言及二进制高效传输(当然,除了二进制,也支持json等常用序列化机制),官网地址:http://thrift.apache.or ...

  3. log4j日志优先级问题的后续

    前文:http://www.cnblogs.com/chyu/p/4280440.html 出现一处吐槽失误,当时还想怎么会设置成warn级别.. <appender name="ST ...

  4. 通过修改ajaxFileUpload&period;js实现多图片动态上传并实现预览

    参考:http://smotive.iteye.com/blog/1903606 大部分我也是根据他的方法修改的,我也要根据name实现动态的多文件上传功能,但是有个问题使我一直无法实现多文件上传. ...

  5. COJN 0483 800501求最大非空子矩阵

    800501求最大非空子矩阵 难度级别:B: 运行时间限制:1000ms: 运行空间限制:51200KB: 代码长度限制:2000000B 试题描述 已知矩阵的大小定义为矩阵中所有元素的和.给定一个矩 ...

  6. 转:15 Best Responsive Web Design Testing Tools

    Responsive Web Design is regarded as being the approach which suggests that web design and developme ...

  7. 阿里Dubbo疯狂更新,关Spring Cloud什么事?

    最近,开源社区发生了一件大事,那个全国 Java 开发者使用最广的开源服务框架 Dubbo 低调重启维护,并且 3 个月连续发布了 4 个维护版本. 我上次在写放弃Dubbo,选择最流行的Spring ...

  8. 数据库历险记(一) &vert; MySQL这么好,为什么还有人用Oracle?

    关系型数据库(Relational DataBase Management System),简称 RDBMS.说起关系型数据库,我们脑海中会立即浮现出 Oracle.MySQL.SQLServer 等 ...

  9. angular简介

    1.angular简介 一款非常优秀的前端高级 JS 框架 由 Misko Hevery 等人创建 2009 年被 Google 公式收购,用于其多款产品 有一个全职的开发团队继续开发和维护这个库 有 ...

  10. idea便利配置使用配置

    让properties能够中文正确显示 1.file encoding ---改为utf-8 spring的autowried没得错误,mybaties没得黄色背景 inspections--spri ...