bashrc: better git add

This commit is contained in:
Jaewook Lee
2024-08-11 14:01:10 +09:00
parent 29aa690274
commit cbbde754a8
2 changed files with 29 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
export RC="~/.bash_aliases"
alias rc="vi $RC && tail $RC && source $HOME/.${SHELL##*/}rc"
alias bat="batcat --paging=never"
alias my="sudo chown -R $(id -u):$(id -g)"
@@ -47,6 +48,8 @@ diff() {
if [[ $# -eq 0 ]]; then
clear
git status
echo
echo
git diff --staged
else
diff -qr "$@"
@@ -78,12 +81,19 @@ alias df="df -h"
alias status="git status ."
alias push="git push"
alias pull="git pull"
alias add="git add"
add() {
if [ $# -eq 0 ]; then
git add .
else
git add $@
fi
diff
}
alias remote="git remote -v"
alias stash="git stash"
alias vimrc="vi ~/.vimrc"
commit() {
git commit -m "$*"
git commit -m "$*"
}
git() {
@@ -103,3 +113,5 @@ git() {
alias cls="clear"
alias weather="curl ko.wttr.in"
alias dryblack="clear; black --check --diff --color ."