Skip to content

Instantly share code, notes, and snippets.

View plijnzaad's full-sized avatar

Philip Lijnzaad plijnzaad

  • Princess Maxima Center for Pediatric Oncology
  • Utrecht, Holland
View GitHub Profile
@plijnzaad
plijnzaad / git-bundle.sh
Last active November 7, 2021 19:34
shell script to backup git commit sets using git bundle
#!/bin/sh
# -*- mode: sh; -*-
## don't use git push to backup your private branches. Bundle only
## the recent commits (from all known branches) and write to a backup
## place. Simply invoke without arguments from within a working copy to
## back it up. Very lightwight and won't pollute the commit history.
##
## To 'restore', download the saved bundle, cd into your working copy and:
## (1) find which branches have any commits in this bundle: