Using git without a center repo

Sometimes we do not want to use a center repo for many reasons. And we still can use git to transfer our codes, with the help of git bundle

To package your local commits, you can use:

git bundle create changes.bundle -1 master

-1 means package the latest 1 commit, you can package latest n commits with this command. And this command is identical:

git bundle create changes.bundle master~1..master

After packaging, you can send the changes.bundle file by any means (say, email) to your partner. Your partner then can pull the commits just like the remote repo:

git pull /path/to/changes.bundle master

It will just behave the same as you pull from a remote git repo.

2 thoughts on “Using git without a center repo

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>