Skip to content

luacm/git-tricks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Git Config

Here's a better version of a .gitconfig. Just save this text as ~/.gitconfig.

Note: Be sure to put your name and email where it says!

[user]
  name = 'Your Name'
  email = [email protected]

[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
  whitespace = red reverse
[color "status"]
  added = green
  changed = yellow
  untracked = red

[core]
  whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol

[alias]
  st = status
  ci = commit
  br = branch
  co = checkout
  df = diff
  dc = diff --cached
  lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
  lol = log --graph --decorate --pretty=oneline --abbrev-commit
  lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
  ls = ls-files
  unstage = reset HEAD

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

Sources: Cheat Sheets, Coder Journal

About

Tricks to make your life with git even easier.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published