Skip to content

Instantly share code, notes, and snippets.

@jesperronn
Last active May 4, 2021 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesperronn/df70c946d97d3957f99ca0e89694d3f9 to your computer and use it in GitHub Desktop.
Save jesperronn/df70c946d97d3957f99ca0e89694d3f9 to your computer and use it in GitHub Desktop.
Git generel opsætning/config som gør din hverdag lettere
# Fra Nine Speed Session Git Kommandolinje presentation 2021-05-04
#
# Flere af disse kan findes i mine dotfiles
# https://github.com/jesperronn/cowboy-dotfiles/blob/master/link/.gitconfig
# benyt git push -u for at oprette branches
git config --global push.default current
# rebase ved hver "pull". Undgå irriterende merge commits
git config --global pull.rebase true
git config --global rebase.autoStash true
# nogle gode aliaser
git config --global alias.git '!exec git'
git config --global alias.st 'status -bs'
git config --global alias.ci 'commit'
git config --global alias.co 'checkout'
git config --global alias.br 'branch'
git config --global alias.brs 'branch --sort committerdate'
# Denne her skal skrives ind...ellers må du selv finde ud af hvordan man escaper:
[alias]
# available short color formats: normal, black, red, green, yellow, blue, magenta, cyan and white. First color: foreground; Second: background.
ls = log --pretty=\"%C(green)%h %C(blue)%<(7,trunc)%cr %C(cyan)%G? %C(magenta)%<(13,trunc)%an%C(reset)%C(normal)%<(80,trunc)% s%C(blue)% ai%C(reset)%C(auto)%+d%C(reset)\" --abbrev-commit --decorate=short
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment