willoller
willoller

Reputation: 7330

Best way to export a git repo and include reflog

I want to save and share a git repo with everything in it, including the current reflog state. Is the best way to do this just to zip up the .git directory? Or could there be a better way?

Upvotes: 2

Views: 238

Answers (1)

CodeWizard
CodeWizard

Reputation: 142214

You can always use git bundle for this purpose.

How to create git bundle?

git bundle create mybundle --all

Or choose other flags as well instead of the --all

--branches[=<pattern>]

Pretend as if all the refs in refs/heads are listed on the command line as <commit>.
If <pattern> is given, limit branches to ones matching given shell glob.
If pattern lacks ?, , or [, / at the end is implied.

--tags[=<pattern>]

Pretend as if all the refs in refs/tags are listed on the command line as <commit>.
If <pattern> is given, limit tags to ones matching given shell glob.
If pattern lacks ?, , or [, / at the end is implied.

Upvotes: 1

Related Questions