I'm trying to clone a repo to the local file system and then checkout a specific commit.
This is what I have:
Git.Clone(GIT_REPO_URL, localPath, CLONE_OPTIONS).then((repo) => {
return repo.getCommit(version).then((commit) => {
// use the local tree
});
}).catch((error) => {
// handler clone failure
});
This clones the repo just fine, but the local version I end up with is the current head of the master and not the commit I checked out (version
).
How do I update the local tree to match this commit?
Thanks.