Last active
August 1, 2023 06:56
-
-
Save kahunacohen/c849e7f2aeeee8a9fc1b9f26b1203763 to your computer and use it in GitHub Desktop.
matav .bash_profile
This file contains 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
# General | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export PATH=$PATH:$HOME/bin | |
# git | |
alias gd="git diff" | |
alias gs='git status' | |
alias gp='git push' | |
alias latest_tag='git tag | sort -V | tail -n1' | |
alias diff_latest_tag='git diff `latest_tag`' | |
# git commit -am | |
gca() { | |
git commit -am "$1" | |
} | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
delete_local_branch() { | |
git branch -d "$1" | |
} | |
delete_remote_branch() { | |
read -p "Are you sure you want to perform this action? (y/n): " response | |
if [[ $response =~ ^[Yy]$ ]]; then | |
git push origin -d "$1" | |
else | |
echo "Action canceled." | |
fi | |
} | |
export PS1="\u@\h \[\e[32m\]\w \[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment