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

Git Learning Part II - Working locally的更多相关文章

  1. authentication not supported Connect to TFS Git from Xamarin Studio (non-hosted, locally installed TFS 2013)

    There are several instructions on how to connect to TFS Git from Xamarin Studio if you're using the ...

  2. Git Learning - By reading ProGit

    Today I begin to learn to use Git. I learn from Pro Git. And I recommend it which is an excellent bo ...

  3. GIT Learning

    一.Why Git 1.1 Git是分布式的,本地的版本管理 chect out代码后会在自己的机器上克隆一个自己的版本库,即使你在没有网络的环境,你仍然能够提交文件,查看历史版本记录,创建项目分支, ...

  4. Git Learning Part III - working remotely (Github)

    help document of Github : https://help.github.com/ 1 upload 1.1 new update  Initialize a repository  ...

  5. Git Learning Part I - Install Git and configure it

    Why we need 'Git' GIt version control: 1. record the history about updating code and deleting code 2 ...

  6. git 学习(1) ----- git 本地仓库操作

    最近在项目中使用git了,在实战中才知道,以前学习的git 知识只是皮毛,需要重新系统的学一下,读了一本叫  Learn Git in a Month of Lunches 的书籍,这本书通俗易懂,使 ...

  7. Git初级

    一,安装git 一键安装 Mac 或 Windows. 二,下载一个工具书 Git 命令手册 free Git cheat sheet 三,安装完成之后需要先配置两个基本配置:用户名和邮箱 $ git ...

  8. 第七章 : Git 介绍 (下)[Learn Android Studio 汉化教程]

    Learn Android Studio 汉化教程 Let’s reset even further to remove all traces of your work on the deprecat ...

  9. git学习一——Pro-Git

    1.配置用户名,邮箱 git config --global user.name "Mike" git config --global user.email Mike@exampl ...

随机推荐

  1. HDU_1711_初识KMP算法

    Number Sequence Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  2. 怎样在PDF文件中查找某个特定的词?

    不得不说中国的修饰词太多了例如:“滚”可以这样说,请你以一种圆润的方式离开:上次小编在路上听到某男子打电话,好像是给女孩子,那口才,是真的牛,夸人不带重复的.要不是我男孩子,我都想以身相许了.人们常常 ...

  3. GETDATE()

    定义和用法 GETDATE() 函数从 SQL Server 返回当前的时间和日期. 语法 GETDATE() 实例 例子 1 使用下面的 SELECT 语句: SELECT GETDATE() AS ...

  4. Keras手写识别例子(1)----softmax

    转自:https://morvanzhou.github.io/tutorials/machine-learning/keras/2-2-classifier/#测试模型 下载数据: # downlo ...

  5. Linux思维导图之查找命令

    常用查找命令的区别:

  6. Linux下SuperLU安装

    SuperLU安装 1.在家目录下建立文件夹superlu,进入该目录,获取安装程序并解压缩 mkdir superlu cd superlu wget http://crd-legacy.lbl.g ...

  7. 单例模式的理解【php】

    单例模式(Singleton Pattern):顾名思义,就是只有一个实例.作为对象的创建模式,单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例. 为什么要使用单例模式 1.P ...

  8. Pycharm中Git、Github的简单使用和配置

    Pycharm中Git.Github的使用 PyCharm本身自带了git,稍微配置一下就可以很好的在图形界面下进行Python项目的版本控制 配置Git 在配置前先新建一个项目,当然也可以打开已有的 ...

  9. Git 基础教程 之 创建与合并分支

  10. lucene_02_IKAnalyre

    前言 在lucene中虽然已经提供了许多的分词器:StandardAnalyzer.CJKAnalyzer等,但在解析中文的时候都会把文中拆成一个个的单子. 毕竟老外不懂中文.这里介绍一个中文的分词器 ...