Checkout.head Async

Checkout.head(repo, [options]).then(function() {
  // checkout complete
});

Patch head checkout to automatically coerce objects.

Parameters Type
repo Repository The repo to checkout head
[options] CheckoutOptions Options for the checkout

Checkout.index Async

Checkout.index(repo, index, [options]).then(function() {
  // checkout complete
});

Patch index checkout to automatically coerce objects.

Parameters Type
repo Repository The repo to checkout an index
index Index The index to checkout
[options] CheckoutOptions Options for the checkout

Checkout.initOptions Sync

var result = Checkout.initOptions(opts, version);
Parameters Type
opts CheckoutOptions the git_checkout_options struct to initialize.
version Number Version of struct; pass GIT_CHECKOUT_OPTIONS_VERSION
Returns
Number Zero on success; -1 on failure.

Checkout.tree Async

Checkout.tree(repo, treeish, [options]).then(function() {
  // checkout complete
});

Patch tree checkout to automatically coerce objects.

Parameters Type
repo Repository
treeish String, Tree, Commit, Reference
[options] CheckoutOptions

Checkout.NOTIFY ENUM

Flag Value
Checkout.NOTIFY.NONE 0
Checkout.NOTIFY.CONFLICT 1
Checkout.NOTIFY.DIRTY 2
Checkout.NOTIFY.UPDATED 4
Checkout.NOTIFY.UNTRACKED 8
Checkout.NOTIFY.IGNORED 16
Checkout.NOTIFY.ALL 65535

Checkout.STRATEGY ENUM

Flag Value
Checkout.STRATEGY.NONE 0
Checkout.STRATEGY.SAFE 1
Checkout.STRATEGY.FORCE 2
Checkout.STRATEGY.RECREATE_MISSING 4
Checkout.STRATEGY.ALLOW_CONFLICTS 16
Checkout.STRATEGY.REMOVE_UNTRACKED 32
Checkout.STRATEGY.REMOVE_IGNORED 64
Checkout.STRATEGY.UPDATE_ONLY 128
Checkout.STRATEGY.DONT_UPDATE_INDEX 256
Checkout.STRATEGY.NO_REFRESH 512
Checkout.STRATEGY.SKIP_UNMERGED 1024
Checkout.STRATEGY.USE_OURS 2048
Checkout.STRATEGY.USE_THEIRS 4096
Checkout.STRATEGY.DISABLE_PATHSPEC_MATCH 8192
Checkout.STRATEGY.SKIP_LOCKED_DIRECTORIES 262144
Checkout.STRATEGY.DONT_OVERWRITE_IGNORED 524288
Checkout.STRATEGY.CONFLICT_STYLE_MERGE 1048576
Checkout.STRATEGY.CONFLICT_STYLE_DIFF3 2097152
Checkout.STRATEGY.DONT_REMOVE_EXISTING 4194304
Checkout.STRATEGY.DONT_WRITE_INDEX 8388608
Checkout.STRATEGY.UPDATE_SUBMODULES 65536
Checkout.STRATEGY.UPDATE_SUBMODULES_IF_CHANGED 131072