Skip to content

Latest commit

 

History

History
executable file
·
53 lines (34 loc) · 1.32 KB

git.md

File metadata and controls

executable file
·
53 lines (34 loc) · 1.32 KB

Git

Table of Contents generated with DocToc

Configuration

SSH/HTTPS

Force git to use HTTPS URLs over SSH:

git config --global url."https://".insteadOf git://

Some aliases

  • gl="git log --pretty='%ci %Cred%h %Creset%s %Cgreen(%an)'"
  • gg="git log --oneline --graph --decorate"
  • gb="git branch -vva"
  • gs="git status"

CRLF conversion

core.autocrlf=true

  • Local -> Remote = CRLF -> LF
  • Remote -> Local = LF -> CRLF

Set to true on Windows.

core.autocrlf=input

  • Local -> Remote = CRLF -> LF
  • Remote -> Local = no modification

Set to input to avoid (auto)generated files with CRLF to be pushed on remote.

core.autocrlf=false

  • Local -> Remote = no modification
  • Remote -> Local = no modification

Set to false in non-Windows environments.