• Android深度探索HAL与驱动开发 第三章


                           Android深度探索HAL与驱动开发

                                      第三章

                                    Git使用入门

                                     读书笔记

    Git是对源代码进行管理的软件。

    一、安装Git

    # apt-get install git

    # apt-get install git-doc git-emall git-gui gitk

    用以下命令控制Git

    # apt-get install git-core

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

    二、查看Git文档

    查看git-checkout命令文档:

    # git help git-checkout

    查看HEML格式文档:

    # git help -w git-checkout

    三、源代码的提交与获取

    1、使用git clone命令在本地创建一个空的版本库:

    # mkdir -p/demo/helloworld-git

    # cd /demo/helloworld-git

    # git init

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

    # cd /demo/helloworld-git

    # echo “helloworld”>helloworld.txt

    # git add helloworld.txt

    # git commit -m ‘helloworld-master’

    -m命令行参数是本次提交的备注;

    3、创建本地分支:git branch

    # git branch                查看本地分支

    # git branch new-branch      新建分支

    # git branch -D new-branch    删除刚建立的分支

    4、切换本地分支:git checkout

    # git checkout new-branch     将本地分支切换到new-branch

    修改helloworld.txt文件内容并重新提交到本地版本库

    # echo ‘世界你好’>helloworld.txt

    # git add helloworld.txt

    # git commint -m helloworld-new-branch

    5、在GitHub上创建开源项目

    6、上传源代码到GitHubgit push

    上传前先备份

    # ssh-keygen -t rsa -C hellloworld@126.com

    上传文件前需要使用git config命令设置上传这的名字和email

    # git cinfig --global user.name “Your Name”

    # git config --global user.email helloworld@126.com

    使用git remove命令设置helloworld工程在GitHub上的URI

    # git remove add orign git@github.com:androidguy/helloworld.git

    7、从GitHub下载源代码:git clone

    使用下命令下载整个工程

    # git clone git@github.com:androidguy/helloworld.git

    四、小结

    五、学习Git的用法。

    http://www.cnblogs.com/qwhw/

  • 相关阅读:
    Mac下启动Apache
    Mac OS X中配置Apache
    catransition type
    Block
    mysql 复制表结构和表数据的区别 like 和 select
    mysql kill掉所有的锁表的进程 未验证
    MySQL所有函数及操作符
    linux各种复制命令
    Mac mysql 导入导出数据库
    数据库总结
  • 原文地址:https://www.cnblogs.com/qwhw/p/5453130.html
Copyright © 2020-2023  润新知