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>

     

  • 相关阅读:
    发送邮件以及数据导出
    GridView的使用(高度封装,不怎么灵活,repeat可替代)
    索引学习(一)
    JVM 学习笔记(二)
    JVM 学习笔记(一)
    JDBC 基础知识总结
    需要学习的点
    The Unified Modeling Language(UML)
    向往2的年代
    SQL 各种连接:内连接,外连接(左外,右外,完全外)
  • 原文地址:https://www.cnblogs.com/gy1233/p/5436560.html
Copyright © 2011-2022 走看看