Get the value of a symbolic ref or resolve a ref to its SHA-1 object id.
Resolves successfully with a SHA-1 object id or the value of a symbolic ref.
const currentCommit = await resolveRef({ fs, dir: '/tutorial', ref: 'HEAD' })console.log(currentCommit)const currentBranch = await resolveRef({ fs, dir: '/tutorial', ref: 'HEAD', depth: 2 })console.log(currentBranch)
Generated using TypeDoc
Get the value of a symbolic ref or resolve a ref to its SHA-1 object id.
Returns
Resolves successfully with a SHA-1 object id or the value of a symbolic ref.
Example