Skip to content

Instantly share code, notes, and snippets.

@Vaansh
Created October 8, 2021 20:53
Show Gist options
  • Save Vaansh/d6ce1b0363622e111faad1899073b244 to your computer and use it in GitHub Desktop.
Save Vaansh/d6ce1b0363622e111faad1899073b244 to your computer and use it in GitHub Desktop.
Work .bashrc
# d8888 888 d8b
# d88888 888 Y8P
# d88P888 888
# d88P 888 888 888 8888b. .d8888b .d88b. .d8888b
# d88P 888 888 888 "88b 88K d8P Y8b 88K
# d88P 888 888 888 .d888888 "Y8888b. 88888888 "Y8888b.
# d8888888888 888 888 888 888 X88 Y8b. X88
# d88P 888 888 888 "Y888888 88888P' "Y8888 88888P'
alias g='git'
alias c='clear'
alias h='history'
alias ga='git add'
alias gs='git status'
alias gaa='git add .'
alias gc='git commit -m'
alias r='source ~/.bashrc'
# 8888888888 888 d8b
# 888 888 Y8P
# 888 888
# 8888888 888 888 88888b. .d8888b 888888 888 .d88b. 88888b. .d8888b
# 888 888 888 888 "88b d88P" 888 888 d88""88b 888 "88b 88K
# 888 888 888 888 888 888 888 888 888 888 888 888 "Y8888b.
# 888 Y88b 888 888 888 Y88b. Y88b. 888 Y88..88P 888 888 X88
# 888 "Y88888 888 888 "Y8888P "Y888 888 "Y88P" 888 888 88888P'
function gcp() {
echo "> New branch? [+used for remote branch] ('n' or 'no' for no, anything else for yes)"
read newbranch
if [ "${newbranch^^}" != "N" ] && [ "${newbranch^^}" != "NO" ]
then
echo "> Name of new branch: [+used for remote branch]"
read newbranchname
git checkout -b $newbranchname
fi
git status
echo "> Files to add:"
read filestoadd
git add $filestoadd
echo "> Enter commit message to add:"
read msg
git commit -m "${msg}" --no-verify
git push origin $(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment