Skip to content

Instantly share code, notes, and snippets.

@nunogrl
Created July 22, 2019 08:33
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 nunogrl/f52e36b2dc01514c6321d9ff9206b66d to your computer and use it in GitHub Desktop.
Save nunogrl/f52e36b2dc01514c6321d9ff9206b66d to your computer and use it in GitHub Desktop.
git-bash profile on Windows machines
#!/bin/bash
BASHCONFIGFILE="$HOME/.minttyrc"
GITCONFIGFILE="$HOME/.gitconfig"
echo "Ensure that Inconsolata is installed"
echo "adding terminal config file"
cat << EOFBASH > $BASHCONFIGFILE
Font=Inconsolata
FontHeight=12
BackgroundColour=106,106,106
Transparency=off
ForegroundColour=255,255,255
ThemeFile=nord
EOFBASH
echo "adding git config file"
cat <<- EOFGIT >> $GITCONFIGFILE
[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
diffc = diff --color-words=.
[core]
editor = vim
EOFGIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment