Reputation: 1212
On Github, I have forked from a repository named RepoBase to a private repository named RepoForked. I then went to create a local branch MyLocalBase on RepoBase and made 5 commits to it.
I want to now bundle these last 5 commits I made in MyLocalBase branch and unbundle them on RepoForked branch. How can I do this ?
Upvotes: 1
Views: 1766
Reputation: 1326792
The natural solution would be to add a remote and push:
git remote add RepoForked ../path/to/repoForked
git checkout MyLocalBase
git push RepoForked MyLocalBase
But, if you must use git bundle
:
cd RepoBase
git bundle create file.bundle MyLocalBase
cd /path/to/RepoForked
git remote add RepoBase /path/to/file.bundle
git fetch RepoBase
git checkout -b MyLocalBase RepoBase/MyLocalBase
So instead of pushing directly, you would fetch from the bundle (which acts as a git repo, but presents itself as one file)
Upvotes: 3