Skip to content

Instantly share code, notes, and snippets.

@okeydoke
Last active August 1, 2021 22:38
Show Gist options
  • Save okeydoke/2957957 to your computer and use it in GitHub Desktop.
Save okeydoke/2957957 to your computer and use it in GitHub Desktop.
git aliases
via http://coderwall.com/p/euwpig?i=3&p=1&t=git
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
git config --global alias.df "diff -U --color"
git config --global alias.st "status -sb"
#new branch
git config --global alias.nb "checkout -b"
https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
# bash
alias git-foco-main="git fetch origin && git checkout origin/main"
@okeydoke
Copy link
Author

git config --global core.autocrlf=false
git config --global core.whitespace cr-at-eol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment