Skip to content

Commit

Permalink
feat: Enhance git aliases and auto_commit script
Browse files Browse the repository at this point in the history
- Added alias for auto_commit with staged option.
- Updated git show command in auto_commit to use fuller format.
- Minor adjustments to existing git aliases for improved usability.
  • Loading branch information
ylogx committed Aug 21, 2024
1 parent 9fe3f5e commit 3fa3999
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions home/.bash_aliases
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,20 @@ hash fzf 2>/dev/null && alias fzfp='fzf --preview '"'"'[[ $(file --mime {}) =~ b
hash fzf 2>/dev/null && alias fzfph='fzf --height 60% --preview '"'"'[[ $(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --style=numbers --color=always {} || highlight -O ansi -l {} || coderay {} || rougify {} || cat {}) 2> /dev/null | head -500'"'"''
alias g='git'
alias gbl='git blame -wMC'
alias gcsc='auto_commit staged commit'
alias gdf='git diff --name-only'
alias gds='git diff --stat'
alias getbase='cp -pv ~/code/codpro/base.c ~/code/codpro/base.cpp ./'
alias gflff='git flow feature finish `git rev-parse --abbrev-ref HEAD | sed "s/feature\///"`'
alias gflfs='git flow feature start'
alias glof='git log --pretty=fuller --stat --decorate --graph --show-signature'
alias glm='git l --all'
alias glof='git log --pretty=fuller --stat --decorate --graph --show-signature'
alias grepi='grep -i'
alias gsf='git show --pretty=fuller --show-signature'
alias gtop='git rev-parse --show-toplevel'
alias gw='./gradlew '
alias gyolo='git yolo || git commit -m"$(curl -s whatthecommit.com/index.txt)"'
#alias gwipit='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]"'
#alias gw='./gradlew '

hash ipython3 2>/dev/null && alias ipy='ipython3'
hash ipython2 2>/dev/null && alias ipy2='ipython2'
Expand Down
2 changes: 1 addition & 1 deletion scripts/bin/auto_commit
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi
if [ "$1" == "staged" ]; then
DIFF=$(git diff --staged)
elif [ "$1" == "show" ]; then
DIFF=$(git show HEAD)
DIFF=$(git show --pretty=fuller HEAD)
elif [ "$1" == "diff-all" ]; then
DIFF=$(git diff)
elif [ "$1" == "diff-heads" ]; then
Expand Down

0 comments on commit 3fa3999

Please sign in to comment.