Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
title~/.gitconfig

[alias]
  ci = commit
  st = status
  br = branch
  co = checkout
  df = diff
  lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
 

[core]
  # WINDOWS
  # autocrlf = true

  # Mac or Linux
  autocrlf = input

...

Follow the instructions for your environment here:
http://git-scm.com/

git-completion

For the linux/mac users, there is a nice script available called git-completion that provides auto-completion of git commands, branch names and other helpful things. It also provides a way to display the active branch on your commandline prompt.

Download the appropriate git-completion script (https://github.com/git/git/tree/master/contrib/completion) and put it in your ~/bin folder. Then source this file in your .profile or .bash-profile. To add the active git branch to your prompt, set your PS1 setting (for the display prompt on a terminal) to something like this:

Code Block

PS1='[\u@\h \w$(__git_ps1 " (%s)")]\$ '

Sign-up for a GitHub account.

...