I have cloned a repository and created a local branch named main.
After that I made some changes in the code, committed and wanted to create a .bundle with the commits.
I generate the .bundle using git bundle create test.bundle main and want to unbundle the commits to check if the file is made correct but when I git clone test.bundle its just generate a folder with nothing inside.
What am I missing here?
A Git bundle is not a repository. It only contains objects (blobs, trees and commits) but no references (branches, tags, etc.)
When you clone a bundle into a new directory, you get all the commits in that bundle, but no branches or tags to refer to those commits. You need to find the commits and create references for them so they're "reachable".
Here's an example that I reproduced locally:
I create a bundle
~/test.bundlefrom my development repo. Then I clone it to~/t/t. The new repo contains no branches (because the bundle does not), but I can create a branch from a commit in the new repo (git resetoperates on the default branch on an empty repo). Then there's themasterbranch in the new repo.