Last active
September 29, 2025 21:28
-
-
Save rodrigocfd/220872e34c0f9876638e04b8d9e59ec9 to your computer and use it in GitHub Desktop.
My very own .bashrc
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
| alias l='ls --color=auto' | |
| alias la='l -a' | |
| alias ll='l -lh' | |
| alias lla='l -alh' | |
| export HISTCONTROL=ignoreboth:erasedups # https://askubuntu.com/a/15929 | |
| # https://thucnc.medium.com/how-to-show-current-git-branch-with-colors-in-bash-prompt-380d05a24745 | |
| gitbranch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' | |
| } | |
| function gr { clear ; grep -rn $1 . ; } | |
| function ff { clear ; find . -name "$1" ; } | |
| alias gitamend='git commit --amend --date="$(date -R)"' | |
| alias gs='git status' | |
| alias gk='gitk' | |
| alias gb='git branch -avv --sort=-committerdate' | |
| #function gitsubtreepull { git subtree pull --prefix $1 $1 master --squash; } | |
| alias gitcleanrepo='git fetch origin --prune && git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@"' | |
| alias gitremoveignored='git clean -dfX' # https://stackoverflow.com/a/46273201/6923555 | |
| alias gitremoveignoredforce='git rm -rf --cached . && git add . && git clean -dfX' | |
| alias gitlinecount='git ls-files | xargs cat | wc -l' | |
| alias gittagsview='git for-each-ref refs/tags' | |
| alias goclean='go clean -cache -modcache -testcache -fuzzcache \ | |
| && rm -rf /C/Users/Rodrigo/AppData/Local/Temp/chrome_drag* \ | |
| && rm -rf /C/Users/Rodrigo/AppData/Local/Temp/go-build* \ | |
| %% rm -rf /C/Users/Rodrigo/AppData/Local/Temp/node-compile-cache \ | |
| && rm -f /C/Users/Rodrigo/AppData/Local/Temp/staticcheck* \ | |
| && rm -rf /C/Users/Rodrigo/AppData/Local/gopls/* \ | |
| && rm -rf /C/Users/Rodrigo/AppData/Roaming/go ' | |
| alias npmlocal='npm list --depth=0' | |
| alias npmglobal='npm list -g --depth=0' | |
| alias npmcacheclean='npm cache clean --force \ | |
| && rm -rf ~/AppData/Local/npm-cache/_logs/*.log \ | |
| && rm -rf ~/AppData/Roaming/npm-cache/_logs/*.log' | |
| alias ncu='ncu --packageFile package.json' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment