环境: fedora 20

$ curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh

############################## 以下内容放入 ~/.bashrc ################################
source ~/.git-prompt.sh # Bash completion
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi export GIT_PS1_SHOWDIRTYSTATE=1 export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '
###################################################################
$ source ~/.bashrc

git 彩色显示当前branch的更多相关文章

  1. Merge git repo into branch of another repo

    git 两个repo merge You can't merge a repository into a branch. You can merge a branch from another rep ...

  2. git clone all branch and create a empty branch

    /******************************************************************** * git clone all branch and cre ...

  3. git clone指定branch或tag

    git clone指定branch或tag发布时间:October 28, 2018 // 分类: // No Comments 取完整: git clone https://github.com/a ...

  4. git pull的时候提示git pull <remote> <branch>

    yuanqiao@yuanqiao-PC MINGW64 /h/WorkSpace/git/dadeTest (dev)$ git pullremote: Enumerating objects: 7 ...

  5. git之remote branch controller(远程分支控制)

    1.创建本地分支 git branch  //查看远程分支 git checkout -b branch_name //创建远程分支 在查看分支git branch 2.将分支提交到远程仓库 此时远程 ...

  6. git查看各个branch之间的关系

    1.pull所有branch for remote in `git branch -r `; do git branch --track $remote; done for remote in `gi ...

  7. git clone远程branch和tag

    1.查看远程分支 git branch -r 2.测试git clone romete,只是clone远程remote的master,不会clone其他的目录 -------------------- ...

  8. git查看各个branch之间的关系图

    两种方法: 一.  使用Git log命令 git log --graph --decorate --oneline --simplify-by-decoration --all 说明: --deco ...

  9. Git merge一个branch到另一个branch

    在项目开发过程中,需要merge一个branch (branch名 taskBranch) 到另一个名为develop 的branch 方法: 先保证当前停留在develop的branch上 然后执行 ...

随机推荐

  1. 计算机网络协议包头赏析-UDP

    之前我们已经针对以太网.IP.TCP协议,进行了包头赏析.本次,我们继续UDP协议包头赏析. 提到TCP,想必大家会有所了解,它早已是家喻户晓的一个网络协议了,而UDP远没有他的大哥那么的有名,所以, ...

  2. 开始使用storm

     开始使用storm 本章将讲述如何安装.部署.启动和停止 Storm 集群. Storm 的安装比较简单,但在安装 Storm 之前需要做好充足的准备,本章将介绍安装的整个流程.在官网上可以下载到S ...

  3. HDU P4578 Transformation

    Problem Description Yuanfang is puzzled with the question below: There are n integers, a1, a2, …, an ...

  4. iOS Xcode的快捷键

    将一些搜集和经常使用的快捷键记录下来,方便你我. Command +1~ 8: 跳转到导航区的不同位置 Command +0 :显示/隐藏导航区 Command Alt 1~ 6:在不同检测器之间跳转 ...

  5. Http、Socket的区别

    转自:http://jingyan.baidu.com/article/08b6a591e07ecc14a80922f1.html 网络由下往上分为 物理层.数据链路层.网络层.传输层.会话层.表示层 ...

  6. 订阅基础:RSS、ATOM、FEED、聚合、供稿、合烧与订阅

    很多网友对这类名词概念非常陌生,如果没用过FEED订阅,肯定还会对诸多网站显示的FEED聚合.订阅.ATOM等等非常郁闷,虽然这几个名字间的很多并非并列关系,天缘只是有意把它们放到一起,方便对比参考, ...

  7. 设置 Linux 文件和文件夹权限的方法

    1.字符表示法 类型 操作 权限 u + r g - w o = x a 类型代表改动权限的对象,u表示文件的用户.g表示文件全部者的群组,o表示非用户组用户.a表示ugo 操作 + 表示添加权限,- ...

  8. $GLOBALS['HTTP_RAW_POST_DATA'] 和$_POST的区别(转)

    ---恢复内容开始--- $_POST:通过 HTTP POST 方法传递的变量组成的数组.是自动全局变量. $GLOBALS['HTTP_RAW_POST_DATA'] :总是产生 $HTTP_RA ...

  9. android92 aidl远程进程通信

    05项目RemoteService.java package com.itheima.remoteservice; //05项目 import com.itheima.remoteservice.Pu ...

  10. Python之美[从菜鸟到高手]--Python垃圾回收机制及gc模块详解

    http://blog.csdn.net/yueguanghaidao/article/details/11274737