Skip to content

Instantly share code, notes, and snippets.

@libertyy
libertyy / git-cleanup-repo
Last active December 9, 2020 23:33 — forked from robmiller/git-cleanup-repo
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
CLEANUP_REMOTE=${CLEANUP_REMOTE:-'no'}
git checkout master &> /dev/null
@libertyy
libertyy / .bash_profile
Last active November 29, 2016 22:12 — forked from ahawthorne/.bash_profile
OSX ssh-agent forwarding -> .bash_profile
#####################
# ssh-agent stuff #
#####################
# get the ssh agent started
SSH_ENV="$HOME/.ssh/environment"
KEY_LIST="~/.ssh/id_rsa ~/.ssh/first.lastnameJan2016.pem"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"