Git help: Difference between revisions

From Phobos Wiki
Jump to navigation Jump to search
(Uus lehekülg: '== Git on linux == === show current branch in terminal === <syntaxhighlight lang="bash"> PS1='\[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 " (%s)") \[\033[01;34m\]...')
 
No edit summary
Line 5: Line 5:
PS1='\[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 " (%s)") \[\033[01;34m\]$\[\033[00m\] '
PS1='\[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 " (%s)") \[\033[01;34m\]$\[\033[00m\] '
</syntaxhighlight>
</syntaxhighlight>
=== ~/.gitconfig ===
<pre>
[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
</pre>
==== .gitconfig sendmail (gmail) ====
<pre>
[sendemail]
chainreplyto = false
smtpserver = smtp.gmail.com
smtpserverport = 587
smtpencryption = tls
smtpuser = your@gmail.com
from = your@gmail.com
suppresscc = all
</pre>

Revision as of 15:35, 29 November 2012

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