zoukankan      html  css  js  c++  java
  • GIT使用入门

    GIT使用入门
    ********************
    Linux内核代码及很多著名的项目都使用Git进行源代码管理
    了解Git的理论和基本使用方法会有助于获取更多的学习资源

    ///////////////////////////////////////////
    安装GIT:
    很多Linux系统自带GIT,如果没有,需要自行安装。
    方法:
    # apt-get install git
    # apt-get install git-doc git-svn git-email git-gui gitk
    //////////////////////////////////////////////////////////
    查看GIT文档:
    1.直接用man命令查看指定命令的帮助文档
    2.安装git-doc后会安装git的文本格式和HTML格式的文档
    以文本形式查看命令:# git help <sub-command>
    3.查询git-checkout命令的文档: #git help git-checkout
    若想看HTML格式的: # git help -w git-checkout
    ///////////////////////////////////////////////////////
    源代码的提交与获取:
    1.建立一个开源项目的工作目录:# mkdir -p /demo/helloworld-git
    2.进入该工作目录:# cd /demo/helloworld-git
    3.执行:# git init(输出:Initialized empty Git repository in /demo/helloworld-git/.git/)
    4.# ls -al
    5.将文件提交到本地版本库:
    # cd /demo/helloworld-git
    # echo "helloworld" > helloworld.txt
    # git add helloworld-master
    # git log
    6.创建本地分支:git branch
    # git branch
    # git branch new-branch
    # git branch -D new-branch
    7.切换本地分支:
    # git checkout new-branch
    8.在GitHub上创建开源项目
    9.上传源代码到GITHub:git push
    10.从GITHub下载源代码:git clone

    http://www.cnblogs.com/zygoodest/

  • 相关阅读:
    spring 定时任务 taskScheduler详解
    shiro.ini 配置详解
    nginx : server_name localhost 和 chrome : Provisional headers are shown
    参数文件管理
    归档日志管理
    日志文件管理
    控制文件管理
    数据文件管理
    OGG配置参数样例
    OGG配置案例一(源表与目标表结构一致)
  • 原文地址:https://www.cnblogs.com/zygoodest/p/5452059.html
Copyright © 2011-2022 走看看