zoukankan      html  css  js  c++  java
  • Git(to be continued...)

    You tell Git you want to save a snapshot of your project with the git commit command and it basically records a manifest of what all of the files in your project look like at that point. Then most of the commands work with those manifests to see how they differ or pull content out of them.If you think about Git as a tool for storing and comparing and merging snapshots of your project, it may be easier to understand what is going on and how to do things properly.

    1、Getting and creating project.

    In order to do anything in Git, you have to have a Git repository. This is where Git stores the data for the snapshots you are saving.There are two main ways to get a Git repository(initialize a new one from an existing directory or clone one from a public Git repository).

    1)、git init

    To create a repository from an existing directory of files, you can simply run git init in that directory.You can do this in any directory at any time, completely locally.

    #git init

    Now you can see that there is a .git subdirectory in your project. This is your Git repository where all the data of your project snapshots are stored.

    2)、git clone

    You simply run the git clone [url] command with the URL of the project you want to copy.

    #git clone /home/jay/applications/

    This will copy the entire history of that project so you have it locally and it will give you a working directory of the main branch of that project so you can look at the code or start editing it. Also, you can see the .git subdirectory - that is where all the project data is.

    2、Base snapshotting.

    to be continued...

    3、Reference.

    Git Reference: http://gitref.org/inspect/#log

  • 相关阅读:
    Python_turtle绘图实例(持续更新)
    C++程序设计实验考试准备资料(2019级秋学期)
    利用next_permutation()实现全排列 完成 阮小二买彩票
    用埃氏算法来素数求和
    C++指针注意事项
    double与float的输入输出格式
    图片文件隐写术
    文件操作与隐写
    MFC 消息机制
    MFC应用中处理消息 创建窗口和会话框的顺序
  • 原文地址:https://www.cnblogs.com/hshuzhao/p/3030792.html
Copyright © 2011-2022 走看看