libgit2

git_clone_options

Version:

Clone options structure

Use zeros to indicate default settings. It's easiest to use the GIT_CLONE_OPTIONS_INIT macro:

git_clone_options opts = GIT_CLONE_OPTIONS_INIT;

  • checkout_opts is options for the checkout step. To disable checkout, set the checkout_strategy to GIT_CHECKOUT_DEFAULT.
  • bare should be set to zero to create a standard repo, non-zero for a bare repo
  • ignore_cert_errors should be set to 1 if errors validating the remote host's certificate should be ignored.

** "origin" remote options: **

  • remote_name is the name given to the "origin" remote. The default is "origin".
  • checkout_branch gives the name of the branch to checkout. NULL means use the remote's HEAD.

Signature

typedef struct git_clone_options { unsigned int version git_checkout_opts checkout_opts git_remote_callbacks remote_callbacks int bare int ignore_cert_errors const char *remote_name const char *checkout_branch };

Members

unsigned int
version
checkout_opts
remote_callbacks
int
bare
int
ignore_cert_errors
const char *
remote_name
const char *
checkout_branch

Parameter To

Versions