环境: 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. StreamWriter

    public StreamWriter( string path, bool append ) 参数 path 类型:System.String要写入的完整文件路径. append 类型:System ...

  2. local storage 简单应用‘’记住密码’

    前些时候一直用cookie等来进行登录页面记住面膜操作,但是由于其存储容量小等缘故,所以后来转向local storage,原理为:当用户勾选记住密码时,local storage 存储用户名密码同时 ...

  3. 从CR线下活动学到的:如何组织一个小的线下活动

    作者:朱克锋 邮箱:zhukefeng@iboxpay.com 转载请注明出处:http://blog.csdn.net/linux_zkf 周末在腾讯组织了GR,活动达到了预期的收获,从这次活动我主 ...

  4. UVA 557 - Burger(概率 递推)

     Burger  When Mr. and Mrs. Clinton's twin sons Ben and Bill had their tenth birthday, the party was ...

  5. NAS、DAS和SAN三种存储究竟是什么?

    首先,NAS(Network Attached Storage,网络附加存储)全面改进了以前低效的DAS存储方式,它是采用独立于PC服务器,单独为网络数据存储而开发的一种文件服务器. NAS服务器中集 ...

  6. 【转】Java Thread.join()详解

    http://www.open-open.com/lib/view/open1371741636171.html 一.使用方式. join是Thread类的一个方法,启动线程后直接调用,例如: ? 1 ...

  7. get-random生成电话号码

    "138"+((0..9|Get-Random -count 10) -join $null) From:http://blog.csdn.net/shrekz/article/d ...

  8. Python邮箱客户端编写之接收邮件操作

    Python的POP3类有很多方法来管理邮箱. 首先需要导入poplib库,import poplib POP3(server) 连接到邮箱服务器 user(username)将用户名发送至服务器,等 ...

  9. 实现app上对csdn的文章查看,以及文章中图片的保存 (制作csdn app 完结篇)

    转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/24022165 今天给大家带来CSDN的完结篇,即增加文章的查看和文章中图片的保存 ...

  10. linux中安装easy_install(setuptools)

    假设是相似于ubuntu的带桌面的系统直接下载安装就能够了.下面是针对centOS的命令行安装方法 最好先查看版本号号,依据版本号来选择安装方法.终端命令例如以下 # lsb_release -a 版 ...