Skip to content

frozenfrank/byte-bin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

143 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

byte-bin

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!

Installation

Bash Alias Installation

Tip

The bash aliases are all you really need ;)

curl -fsSL https://raw.githubusercontent.com/frozenfrank/byte-bin/dotfiles/install.sh | bash

See the documentation on the dotfiles.

Shell Directory installation

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.

Polyrepo - Managing multiple branches

Since this repository contains many independent branches, consider using the following specializations:

  1. Only clone the one branch at a time (defaulting to the main branch)

    git clone --single-branch git@github.com:frozenfrank/byte-bin.git
    git clone --single-branch --branch <branch_name> git@github.com:frozenfrank/byte-bin.git
  2. Adjust git fetch behavior 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"
  3. 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 config --add remote.origin.fetch "+refs/heads/$branch:refs/remotes/origin/$branch" && git push -u origin "$branch"; }; f'
  4. Optional Clean up extra branches

    git branch -r | egrep -v 'main|YOUR_BRANCH_HERE' | xargs git branch -Dr

About

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!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages