Last active
April 24, 2020 11:33
-
-
Save robsonbittencourt/454af7dfe35b8417180ed10d18615ed0 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
# .bash_profile | |
if [ -r ~/.bashrc ]; then | |
. ~/.bashrc | |
fi |
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
export LC_ALL= | |
export LANG=C.UTF-8 | |
#functions | |
deleteRemoteBranch() { | |
git push origin :$1 | |
} | |
deleteLocalBranch() { | |
git checkout master && | |
git branch -D $1 | |
} | |
pullRebase() { | |
git pull --rebase | |
} | |
commit() { | |
if [ "$#" -eq 0 ] | |
then | |
git commit | |
else | |
message=$@ | |
git commit -m "$message" | |
fi | |
} | |
unstage() { | |
git reset HEAD $1 | |
} | |
unstageAll() { | |
git reset HEAD | |
} | |
revert() { | |
unstage $1 | |
git checkout $1 | |
} | |
revertAll() { | |
unstageAll | |
git checkout . | |
} | |
#util | |
alias home='cd ~/' | |
#git | |
alias gs='git status' | |
alias gl='git pull' | |
alias gp='git push' | |
alias ga='git add' | |
alias gc='commit' | |
alias gm='git merge' | |
alias gac='git add . && commit' | |
alias gca='git commit --amend --no-edit' | |
alias gce='git commit --amend' | |
alias gck='git checkout' | |
alias glo="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' -n 15" | |
alias gss='git stash save -u' | |
alias gssa='git stash apply --index' | |
alias undoCommit='git reset --soft HEAD~1' | |
alias cleanAll='git reset --hard ; git clean -fd' | |
#shell | |
alias c='clear' | |
alias reloadBash='source ~/.bash_profile && source ~/.zshrc' | |
alias .="cd .." | |
alias ..="cd .. && cd .." | |
#ubuntu | |
alias updateSystem='sudo apt-get update ; sudo apt-get upgrade -y ; sudo apt-get dist-upgrade -y ; sudo apt-get clean all -y; sudo apt autoremove -y' |
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
/* | |
!*.bash_profile | |
!*.bashrc | |
!*.gitignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment