Hi,
I noticed lnk-identities' git::clone function creates a repository with
multiple local branches. Should this be the case?
My expectation is to mirror git-clone's behavior which by default
creates one local branch for the project's default branch i.e. 'master'.
Thanks,
SlackCoder
On Tue Aug 16, 2022 at 5:03 PM IST, Slack Coder wrote:
> Hi,>> I noticed lnk-identities' git::clone function creates a repository with > multiple local branches. Should this be the case?>> My expectation is to mirror git-clone's behavior which by default > creates one local branch for the project's default branch i.e. 'master'.>> Thanks,>> SlackCoder
This cloning command is to essentially "clone" what's represented in
the monorepo for that project and make an exact working copy in the
directory you're cloning to. I suppose it can be thought of as a clone
and fetch.
> This cloning command is to essentially "clone" what's represented in> the monorepo for that project and make an exact working copy in the> directory you're cloning to. I suppose it can be thought of as a clone> and fetch.
Would following git-clones behavior not be better or more accurate?
Git-clone does the same thing, except the view is different (unless the
--mirror option is used). All local branches on the remote are copied
to the cloned project as remote tracking branches listed under 'git
branch -r'. Keeping these as remote branches would reduce duplication
and is more in line with expectations of people coming from git.
I am working on radicle-cli, and we're relying on clone via the
lnk-identities::checkout. Maybe there's a better route? The additional
local branches will be unnecessary for most end users, just pushing
active contributors to delete them after.