Android深度探索--HAL与驱动开发第三章读后感

Linux不同于Windows和Mac OS X,Linux为直接提供源代码,开源也是Linux的特点,但由于Linux的内核版本非常的多,为了减小发型包大小,直接提供源代码,用户安装软件等都是直接提供的源代码。但因为涉及到源代码,就需要对源代码进行管理,所以大部分人都是用Linux之父Liunx编写的Git对源代码进行管理,而且Git与其他的代码管理软件相比,其各个方面都要优越,所以,这本书在这张讲解Git的使用入门

首先,需要安装Git有的Liunx系统是自带Git的,如果没有,就需要进行安装。

那如何查看Git文档,就需要以下命令:

#man git-checkout             \显示帮助信息,按“q”退出

#git help <sub-command>       \以文本显示指定文档使用

#git help git-checkout           \在终端显示帮助信息

 #git help-w git-checkout         \ HTML格式文档

Git的功能特别复杂,如何进行源代码的提交与获取,主要由以下命令:

git init:创建版本库

#mkdir –p /demo/helloworld-git

#cd /demo/helloworld-git

#git init                         \建立并进入目录(/demo/helloworld-git)

git commit:将文件提交到本地版本库

#cd/demo/helloworld-git

#echo “helloworld”> helloworld.txt    \在helloworld目录下建立helloworld。txt文件

#git add helloworld.txt

#git commit –m ‘helloworld-master’      \提交到版本库

#git branch             \创建本地分支

#git checkout             \切换本地分支

#git push                  \上传源代码到GitHub

#git clone              \从GitHub下载源代码

原文地址:https://www.cnblogs.com/cui8171/p/5431910.html