A collection of handy utility functions, scripts, and random coding snippets gathered over time. From small code hacks to reusable features, this is the go-to bin for all those useful bytes of code!
After cloning the repo, install the shell scripts on your PATH with the following:
export PATH="path/to/byte-bin/shell:$PATH"This will allow your shell to autocomplete and run the scripts natively.
Since this repository contains many independent branches, consider using the following specializations:
-
Only clone the main branch
git clone --single-branch git@github.com:frozenfrank/byte-bin.git
-
Adjust
git fetchbehavior to only fetch some branches# View the current refspec setting git config --get-all remote.origin.fetch # Only fetch the main branch git config remote.origin.fetch "+refs/heads/main:refs/remotes/origin/main"
-
Create alias to register newly created branches for updates
# Usage: `git pushu`. Behaves the same as `git push`, expect it also adds the current branch to the refspec for receiving updates. git config --global alias.pushu '!f() { branch="${1:-$(git rev-parse --abbrev-ref HEAD)}"; git push -u origin "$branch" && git config --add remote.origin.fetch "+refs/heads/$branch:refs/remotes/origin/$branch"; }; f'
-
(Optional) Clean up extra branches
git branch -r | egrep -v 'main|YOUR_BRANCH_HERE' | xargs git branch -Dr