Last active
April 7, 2020 12:56
-
-
Save NikitaShkaruba/06afbdb14a42a11c4a3a864f8f7c8615 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### GIT ### | |
# Frequently used | |
git config --global alias.co checkout | |
git config --global alias.st status | |
git config --global alias.re reset | |
# Not frequently used | |
git config --global alias.ci commit | |
git config --global alias.br branch | |
# Push / pull strategies | |
git config --global push.default current | |
git config --global pull.default current | |
# Bash prompt with git branch | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
### TERMINAL ### | |
alias git_recent_checkouts='git reflog --date=relative | head -n 100 | grep checkout' | |
# Configs | |
set -o vi | |
# Bash line | |
export PS1="\u@\033[32m\]\h\[\033[m\] \W\[\033[35m\]\$(parse_git_branch)\[\033[00m\] $ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment