Created
May 21, 2024 17:59
-
-
Save Andrew-Pynch/bb0300ed9535d9ce9a7623f255787369 to your computer and use it in GitHub Desktop.
This file contains 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 gcl='CloneAndrewRepo' | |
alias gpl='git pull' | |
alias gaa='git add --all' | |
alias gam='git commit -a -m' | |
alias gampu='AddCommitAndPush' | |
alias gpu='git push' | |
alias gba='git branch -a' | |
alias gb='git branch' | |
alias gc='git checkout' | |
alias gbgc='BranchAndCheckout' | |
alias gm='git merge' | |
alias gpsu='PushBranchSetUpstream' | |
alias gl='git log' | |
alias gsa='git stash --all' | |
alias gbsc='git branch --show-current' | |
alias inr='InitNewRepo' | |
alias grh='ResetCommitHash' | |
alias gbdl='GitBranchDeleteLocal' | |
alias gbdo='GitBranchDeleteOrigin' | |
GitBranchDeleteLocal() { | |
git branch -d $1 | |
} | |
GitBranchDeleteOrigin() { | |
git push origin --delete $1 | |
} | |
PushBranchSetUpstream() { | |
git push --set-upstream origin $1 | |
} | |
BranchAndCheckout() { | |
git branch $1 && git checkout $1 | |
} | |
InitNewRepo() { | |
mkdir $1 | |
cd $1 | |
git init | |
touch README.md | |
git add --all | |
git commit -a -m "Add README.md" | |
} | |
ResetCommitHash() { | |
git reset --hard $1 | |
git reset --soft HEAD@{1} | |
git commit -a -m "Revert head..." | |
git push | |
} | |
CloneAndrewRepo() { | |
git clone 'https://github.com/andrew-pynch/'$1 | |
cd $1 | |
} | |
AddCommitAndPush() { | |
git add --all | |
git commit -a -m "$1" | |
git push | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment