Git学习笔记

仓库介绍
- Git 基本使用及技巧总结
- Git 思维导图
Something I hope you know before go into the coding~
First, please watch or star this repo, I'll be more happy if you follow me.
Bug report, questions and discussion are welcome, you can post an issue or pull a request.
相关站点
- Git Pro教程站点 : https://git-scm.com/book/en/v2
- GitBook : https://yifengyou.gitbooks.io/learn-git/content/
- GitHub : https://github.com/yifengyou/learn-git/
- GitPage : https://yifengyou.github.io/learn-git/
常用技能
国内git访问异常
镜像加速,将github.com替换为hub.fastgit.org
https://hub.fastgit.org/USERNAME/REPO
GitHub站点图片无法打开问题,请修改hosts文件,添加如下内容即可
# GitHub Start
192.30.253.112 Build software better, together
192.30.253.119 gist.github.com
151.101.184.133 assets-cdn.github.com
151.101.184.133 raw.githubusercontent.com
151.101.184.133 gist.githubusercontent.com
151.101.184.133 cloud.githubusercontent.com
151.101.184.133 camo.githubusercontent.com
151.101.184.133 avatars0.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
# GitHub End
自动保存密码
对应用户家目录下创建.git-credentials
vim ~/.git-credentials
https://USERNAME:PASSWD@github.com
其中@用 %40 表示
git config --global credential.helper 'store'
ssh公私钥免密
ssh-keygen -t rsa -C "842056007@qq.com"
公钥在 ~/.ssh/rsa.pub 私钥位于 ~/.ssh/rsa
ssh默认编辑器配置
git config --global core.editor vim
Git 简介
Git(读音为/gɪt/)是一个开源的分布式版本控制系统,可以有效.高速的处理从很小到非常大的项目版本管理。
Git 诞生于2005年,Linus Torvalds 为了帮助管理 Linux 内核开发花了两周时间自己用C写的一个分布式版本控制系统

Torvalds 开始着手开发 Git 是为了作为一种过渡方案来替代 BitKeeper,后者之前一直是 Linux 内核开发人员在全球使用的主要源代码工具。开放源码社区中的有些人觉得BitKeeper 的许可证并不适合开放源码社区的工作,因此 Torvalds 决定着手研究许可证更为灵活的版本控制系统。尽管最初 Git 的开发是为了辅助 Linux 内核开发的过程,但是我们已经发现在很多其他自由软件项目中也使用了 Git。例如 很多 Freedesktop 的项目迁移到了 Git 上。
GitHub 托管平台
GitHub是一个面向开源及私有软件项目的托管平台,因为只支持 Git 作为唯一的版本库格式进行托管,故名GitHub。
GitHub于2008年4月10日正式上线,除了 Git 代码仓库托管及基本的 Web 管理界面以外,还提供了订阅、讨论组、文本渲染、在线文件编辑器、协作图谱(报表)、代码片段分享(Gist)等功能。目前,其注册用户已经超过350万,托管版本数量也是非常之多,其中不乏知名开源项目 Ruby on Rails、jQuery、python 等。

- 章鱼猫-GitHub吉祥物-https://octodex.github.com/
2018年6月4日晚,微软宣布,通过75亿美元的股票交易收购代码托管平台 GitHub。
目录
图解Git操作
常用Git实例
Git详解
- 起步
- Git基础
- Git分支
- 服务器上的Git
- 分布式Git
- GitHub
- Git工具
- 自定义Git
- Git与其他系统
- 使用repo管理多个Git仓库
- Git内部原理
- 其它环境中的Git
- 将Git嵌入你的应用
- 附录-Git命令
参考
思维导图



总结
1. 如何学习神器,没啥特殊方法,经常用,多接触
2. 快速上手不可或缺思维导图
3. 不懂源码别说精通,顶多熟练~