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. day37-3 异常处理

    目录 异常处理 捕捉异常 raise assert 异常处理 捕捉异常 语法错误无法通过try检测,就像函数一样 try: 1/0 except Exception as e: # Exception ...

  2. List集合的特有功能概述和测试

    List集合的特有功能概述和测试A:List集合的特有功能概述void add(int index,E element)E remove(int index)E get(int index)E set ...

  3. Network-Flow

    //Created by pritry int graph[MAX][MAX]; //原图 int source; //起点,这里为0 int sink; //终点,这里为n-1 int e[MAX] ...

  4. [luogu4285 SHOI2008] 汉诺塔 (暴力,数学)

    传送门 Solution 强行猜测公式形如\(f_i=k\times f_{i-1}+b\),暴力求\(f_1,f_2,f_3\),剩下的递推就行 Code #include <cstdio&g ...

  5. Python学习笔记之模块与包

    一.模块 1.模块的概念 模块这一概念很大程度上是为了解决代码的可重用性而出现的,其实这一概念并没有多复杂,简单来说不过是一个后缀为 .py 的 Python 文件而已 例如,我在某个工作中经常需要打 ...

  6. nginx下部署showdoc

    1. 安装nginx服务器sudo apt-get install nginx -y 2. 启动服务sudo service nginx start 3. 安装php环境 sudo apt-get i ...

  7. 继续聊WPF——进度条

    ProgressBar控件与传统WinForm使用方法完全一样,我们只需关注: Minimum——最小值,默认为0: Maximum——最大值,默认为100. Value——当前值.   关键是它的控 ...

  8. python第十一周:RabbitMQ、Redis

    Rabbit Mq消息队列 RabbitMQ能为你做些什么? 消息系统允许软件.应用相互连接和扩展.这些应用可以相互链接起来组成一个更大的应用,或者将用户设备和数据进行连接.消息系统通过将消息的发送和 ...

  9. EF--复杂类型

    介绍EF复杂类型的文章 我理解的复杂类型就是简化了编码的操作,实际上在数据库中还是按照约定生成相应的类似"类名_类名"的表结构 public class CompanyAddres ...

  10. [bzoj3717][PA2014]Pakowanie_动态规划_状压dp

    Pakowanie bzoj-3717 PA-2014 题目大意:给你n个物品m个包,物品有体积包有容量,问装下这些物品最少用几个包. 注释:$1\le n\le 24$,$1\le m\le 100 ...