zoukankan      html  css  js  c++  java
  • Android驱动开发第三章

    第三章主要讲了git的使用入门,Git是目前世界上最先进的分布式版本控制系统。 

        使用git之前首先应该安装git,Ubuntu Linux版本中安装git的指令        

      1、# apt-get install git
      2、# apt-get install git-doc git-svn git-email git-gui gitk 

       在使用man命令查看指定帮助文档

          1、查询git-checkout 命令的帮助文档,使用命令:# man git-checkout 
      2、查询git-checkout 命令的文档,使用命令:# git help git-checkout
      3、查询HTML格式的git-checkout 命令的文档,使用命令:# git help -w git-checkout                                      

       创建版本库   git int           

          1.建立一个开源项目的工作目录,并进入工作目录 
      # mkdir -p /demo/helloworld-git
      # cd  /demo/helloworld-git
      2.执行命令
      # git init
      2、将文件提交到本地版本库:git commit
      1.进入/demo/helloworld-git 目录,并建立一个helloworld.txt文件
      # cd /demo/helloworld-git
      # echo “helloworld”>helloworld.txt
      2.执行命令将helloworld.txt文件加到本地版本库的索引中,并将helloworld.txt文件提交到版本库
      # git add helloworld.txt
      # git commit -m ‘helloworld-master’
      3.显示日志记录
      # git log
      恢复文件
      # git checkout helloworld.txt
      3、创建本地分支:git branch
      另外Git鼓励大量使用分支:

      查看分支:git branch

      创建分支:git branch <name>

      切换分支:git checkout <name>

      创建+切换分支:git checkout -b <name>

      合并某分支到当前分支:git merge <name>

      删除分支:git branch -d <name>

     

  • 相关阅读:
    字符串去重
    你必须懂的 T4 模板:深入浅出
    解决T4模板的程序集引用的五种方案
    table 合并行和列
    porwedesigner 去掉引号
    面向对象JS基础
    19套最新的免费图标字体集
    推荐 15 款很棒的文本编辑器
    13个JavaScript图表(JS图表)图形绘制插件
    推荐10款免费而优秀的图表插件
  • 原文地址:https://www.cnblogs.com/gy1233/p/5436560.html
Copyright © 2011-2022 走看看