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>

     

  • 相关阅读:
    11-27:项目进度
    11-23:项目进度
    Scrum团队成立,阅读《构建之法》第6~7章,并参考以下链接,发布读后感、提出问题、并简要说明你对Scrum的理解
    团队项目:二次开发
    实验二 作业调度
    欣赏并且评价同学的复利计算博客
    对于我们的复利计算程序的升级
    用汉堡包的方式评价一下自己的合作伙伴
    结对项目:复利计算
    软件工程构建之法第四章读后感
  • 原文地址:https://www.cnblogs.com/gy1233/p/5436560.html
Copyright © 2011-2022 走看看