Skip to content

Instantly share code, notes, and snippets.

@semperos
Created December 1, 2010 19:59
Show Gist options
  • Save semperos/724113 to your computer and use it in GitHub Desktop.
Save semperos/724113 to your computer and use it in GitHub Desktop.
Create a bundle and tag the codebase so we can make bundles incrementally
#!/bin/bash
# If on Windows, run this using the Git Bash
cd /path/to/git/repo
# Create a git bundle which includes only commits from
# the commit tagged "last_bundle" up to the present state
# of my "master" branch
git bundle create my_code.bundle last_bundle..master
# Tag the current commit with "last_bundle",
# replacing the previous tag, so next time we run this,
# this commit is the starting point of our bundle.
git tag -f last_bundle master
# Move my bundle somewhere outside my git repo,
# e.g. my home directory
mv my_code.bundle ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment