Skip to content

krazykeith/Helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Helpers

Tmux Setup

Tmux config with per-pane git branch/worktree display.

ln -sf ~/Helpers/tmux/.tmux.conf ~/.tmux.conf

Reload an existing tmux session:

tmux source-file ~/.tmux.conf

Git Helpers

Git config updates

git config --global rebase.updateRefs true
git config --global rerere.enabled true

Explanation

  • rebase.updateRefs true - Update branch references when rebasing. See here for more information
  • rerere.enabled true - Enable Reuse Recorded Resolution. See here for more information

Adding Custom Git Commands

cd
git clone git@github.com:krazykeith/Helpers.git
chmod +x ~/Helpers/git-commands/*
echo 'export PATH="$HOME/Helpers/git-commands:$PATH"' >> ~/.zshrc
source ~/.zshrc

Cleaning up local branches which no longer exist on remote

The below command will delete all local branches which no longer exist on remote.

git branch -v | grep '\[gone\]' | awk '{print $1}' | xargs git branch -D

Explanation

  • git branch -v - List all branches with their last commit message
  • grep '\[gone\]' - Filter out branches which no longer exist on remote
  • awk '{print $1}' - Extract branch name
  • xargs git branch -D - Delete the branch

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages