Skip to content

Instantly share code, notes, and snippets.

@adriengibrat

adriengibrat/.bashrc

Created May 19, 2020
Embed
What would you like to do?
.dotfiles
#[...]
# Default language to English
export LANG=en_US.UTF-8
export LANGUAGE=en_US
export LC_ALL=en_US.UTF-8
#export LC_MESSAGES=en_US
#export LC_MESSAGES=C
# GIT PS1 FTW
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM="verbose"
export GIT_PS1_DESCRIBE_STYLE="branch"
export GIT_PS1_SHOWCOLORHINTS=1
PS1='\[\033[01;30m\]\t `if [ $? -eq 0 ]; then echo "\[\033[01;32m\]ツ"; else echo "\[\033[01;31m\]✗"; fi`$(__git_ps1 "(%s)\[\033[01m\]")\[\033[00;36m\]\w\[\033[00m\] '
# Add local bin to path
export PATH=$HOME/.local/bin:$PATH
# Use VSCode as primary editor
export EDITOR="code --new-window --wait"
# NPM auto-completion
eval "$(npm completion)"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
[user]
email = adrien.gibrat@gmail.com
name = Adrien Gibrat
[push]
default = current
[alias]
co = checkout
ci = commit
st = status
br = branch
#
dm = !git branch --merged | grep -v '\\*' | grep -v 'master' | xargs -n 1 git branch -d
rb = !git fetch origin master:master && git rebase master
lg = log --graph --pretty=lg
di = difftool -d
rd = !git ls-files --deleted -z | xargs -0 git rm
pf = push --force-with-lease
common = "!f() { git merge-base origin/$1 origin/$2 | xargs git checkout; }; f"
[pretty]
lg = format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset
[rerere]
enabled = true
[diff]
tool = vscode
[difftool]
prompt = false
[difftool "vscode"]
cmd = code --new-window --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
[mergetool]
keepBackup = false
[mergetool "vscode"]
cmd = code --new-window --wait $MERGED
[core]
editor = code --new-window --wait
excludesfile = ~/.gitignore_global
[fetch]
prune = true
[rebase]
autostash = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.