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/

  • 相关阅读:
    周五笔记
    python2.0代码重构为3.0一日记
    小白使用Bert跑分类模型
    andrew ng 深度学习 网易云课堂课程
    andrew ng machine learning week9 异常检测和推荐系统
    解决端口占用问题
    postgresqlmysql删除数据表中字段的回车和换行
    echarts常用的属性修改
    后端返回文件流,用blog方式下载 type 值
    antD vue 遇到的一些问题处理
  • 原文地址:https://www.cnblogs.com/zygoodest/p/5452059.html
Copyright © 2011-2022 走看看