Android深度探索第三章心得

本章主要介绍GIT的学习,以及介绍GIT用于获取诸多开源项目的源代码。

1.安装Git命令:   

#apt-get  install git

# apt-get install git-doc git-svn git-email git-gui gitk

2.查看Git文档:

    # man git-checkout

3.源代码的提交与获取

1.创建版本库:git init   GIT的版本库分为本地版本库与远程版本库。在建立开源项目之初,需要使用git init 在本地建立一个空的版本库。其命令为:

# mkdir –p / demo / helloworld – git

# cd / demo / helloword – git

然后执行

# qit  init   之后会输出Initialized empty Git repository in / demo/helloworld – git/.git

之后在helloword-git 目录中使用LS命令# ls –al  此时一个空的版本库已经建立好了。

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

3.创建本地分支: git brarich

4.切换本地分支:get checkout

posted on 2016-04-28 22:10  和璐媛  阅读(177)  评论(0)    收藏  举报

导航