Skip to content

Instantly share code, notes, and snippets.

@scriptnull
Last active January 9, 2024 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scriptnull/2048556883f9aade1b2714ce08c92e1e to your computer and use it in GitHub Desktop.
Save scriptnull/2048556883f9aade1b2714ce08c92e1e to your computer and use it in GitHub Desktop.
My usual bashrc stuff
export PATH="$PATH:$HOME/s"
export PATH="$PATH:/usr/local/go/bin"
export PATH="$PATH:$HOME/go/bin"
b() {
git rev-parse --abbrev-ref HEAD
}
export -f b
c() {
git checkout $@
}
export -f c
f() {
git fetch origin $@
}
export -f f
p() {
git push origin $@
}
export -f p
fb() {
f $(b)
}
export -f fb
pb() {
p $(b)
}
export -f pb
fr() {
fb && git reset origin/$(b) --hard
}
export -f fr
alias s="git status"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment