Last active
June 29, 2020 01:00
-
-
Save abenson/1814f2afd26710a5006855b6c50ef15d to your computer and use it in GitHub Desktop.
getting lazier and lazier
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 co='git checkout' | |
alias ci='git commit' | |
alias ga='git add' | |
alias addp='git add -p' | |
alias status='git status' | |
alias gdiff='git diff' | |
alias gpatch='git diff --no-prefix' | |
alias show='git show' | |
alias wdiff='git wdiff' | |
alias br='git branch' | |
alias pushf='git push -f' | |
alias pullr='git pull -r' | |
alias rebase-up='git pull upstream master --rebase --autostash' | |
cnb() { | |
git status >/dev/null 2>&1 | |
if [ $? -ne 0 ]; then | |
echo "Not a git repo?" | |
return 1 | |
fi | |
if [ -z "$1" ]; then | |
echo "cnb <BRNAME>" | |
return 1 | |
fi | |
co upstream/master | |
co -b $1 | |
} | |
copr() { | |
git status >/dev/null 2>&1 | |
if [ $? -ne 0 ]; then | |
echo "Not a git repo?" | |
return 1 | |
fi | |
if [ -z "$1" ]; then | |
echo "copr <PRID>" | |
return 1 | |
fi | |
co master | |
rebase-up | |
co -b pr$1 | |
git merge-pr $1@upstream | |
} |
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
if [ $UID -eq 0 ]; then | |
PS1='\[\033[1;31m\]\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]# ' | |
else | |
PS1='\[\033[1;33m\]\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]% ' | |
fi | |
export PS1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment