Git help

From Phobos Wiki
Revision as of 15:35, 29 November 2012 by Roland (talk | contribs)
Jump to navigation Jump to search

Git on linux

show current branch in terminal

PS1='\[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 " (%s)") \[\033[01;34m\]$\[\033[00m\] '

~/.gitconfig

[user]
	name = Roland Uuesoo
	email = roland@martem.eu
[core]
	editor = vim.tiny
  whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
[color]
  ui = auto
[color "branch"]
  current = yellow reverse
  local = yellow
  remote = green
[color "diff"]
  meta = yellow bold
  frag = magenta bold
  old = red bold
  new = green bold
[color "status"]
  added = yellow
  changed = green
  untracked = cyan
[color]
  ui = true
[color "diff"]
  whitespace = red reverse
[alias]
  st = status
  ci = commit
  br = branch
  co = checkout
  df = diff
  dc = diff --cached
  lg = log -p
  lol = log --graph --decorate --pretty=oneline --abbrev-commit
  lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
  ls = ls-files

  # Show files ignored by git:
  ign = ls-files -o -i --exclude-standard

.gitconfig sendmail (gmail)

[sendemail]
	chainreplyto = false
	smtpserver = smtp.gmail.com
	smtpserverport = 587
	smtpencryption = tls
	smtpuser = your@gmail.com
	from = your@gmail.com
	suppresscc = all