~/Blog

Brandon Rozek

Photo of Brandon Rozek

PhD Student @ RPI studying Automated Reasoning in AI and Linux Enthusiast.

Sharing Specific Commits with Git Bundle

Published on

Updated on

Warning: This post has not been modified for over 2 years. For technical posts, make sure that it is still relevant.

If you have a large software repository, sometimes you only want to share part of it with a group. You can accomplish this by using git bundle

Creating the Bundle

To bundle all the commits from the development branch to the current head,

git bundle create repo.bundle development..HEAD feature_branch

This will place these commits into a branch called feature_branch in repo.bundle.

Fetching from bundle

On the other side, we need to make sure that we have all the commits up to the development branch synchronized. Then we can fetch the commits from the bundle:

git fetch /path/to/repo.bundle feature_branch:feature_branch

The left side of the colon is what you want to grab from the bundle, the right side is the branch to put the commits to.

git checkout feature_branch
Reply via Email Buy me a Coffee
Was this useful? Feel free to share: Hacker News Reddit Twitter

Published a response to this? :