Coder Social home page Coder Social logo

git-conf's Introduction

Step 1

Download git-completion.bash and git-prompt.sh from https://github.com/git/git/tree/master/contrib/completion

$ mv gitconfig ~/.gitconfig
$ mv git-completion.bash ~/.git-completion.bash
$ mv git-prompt.sh ~/.git-prompt.sh
$ source ~/.git-completion.bash

Step 2

Add to $HOME/.bashrc

# Prompt
red='\[\033[0;31m\]'
brown='\[\033[0;33m\]'
ubrown='\[\033[4;33m\]'
green='\[\033[0;32m\]'
lblue='\[\033[1;34m\]'
blue='\[\033[0;34m\]'
purp='\[\033[0;35m\]'
cyan='\[\033[0;36m\]'
nocol='\[\033[0m\]'

# workstation prompt
PSW="[$green\u$nocol@$brown\h$nocol:$purp\w$nocol]$cyan\!$nocol% "

# server prompt
PSS="[$lblue\$(date +%H:%M)$nocol][$green\u$nocol@$ubrown\h$nocol:$purp\w$nocol]$cyan\!$nocol% "

# standard prompt
if [ -f "$HOME/.git-prompt.sh" ]; then
  . "$HOME/.git-prompt.sh"
  PSW="[$green\u$nocol@$brown\h$nocol:$purp\w$nocol]$cyan\!$nocol$blue\$(__git_ps1)$nocol% "
  PSS="[$lblue\$(date +%H:%M)$nocol][$green\u$nocol@$brown\h$nocol:$purp\w$nocol]$cyan\!$nocol$blue\$(__git_ps1)$nocol% "
fi

export PS1=$PSW

if [ -f "$HOME/.git-completion.sh" ]; then
  . "$HOME/.git-completion.sh"
fi

then

$ source ~/.bashrc

Ref

http://documentup.com/skwp/git-workflows-book

git-conf's People

Contributors

boboppie avatar

Watchers

 avatar  avatar

Forkers

iljsan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.