zoukankan      html  css  js  c++  java
  • Git Learning Part II

    file status life circle

    basic:

    modified:

     

    Examples:

     untracked:

    unmodified: 

    modified:

    Git branching ( $ git branch  : view all the branches)

    create a branch : $ git branch <branch name>

    switching from branch to branch :  $ git checkout <branch name>

    moving in the previous branch : $ git checkout -

    switching to a branch while creating it : $ git checkout -b <new branch's name>

    merge branches :

    $ git merge <branch to merge> :merge branch to current branch

    $ git merge <branch1> <branch2> : merge b1、b2 into current branch

    delete a branch :  $ git branch -d <branch's name> 

    Avoid two things:

    1. Working hard on the same files on different branches.

    2. Rarely merge branches

    View the history  

    $ git log

  • 相关阅读:
    尚观寻求帮助
    linux软链接与硬连接
    linux常用命令(三)
    zend 动作控制器
    zend 路由
    ZF组件功能简介
    zend_controller
    linux常用命令(一)
    练习1
    练习1感受:
  • 原文地址:https://www.cnblogs.com/luiyuying/p/9416486.html
Copyright © 2011-2022 走看看