listRemotes
List remotes
param | type [= default] | description |
---|---|---|
fs | FsClient | a file system client |
dir | string | The working tree directory path |
gitdir | string = join(dir,'.git') | The git directory path |
return | Promise<Array<{remote: string, url: string}>> | Resolves successfully with an array of {remote, url} objects |
Example Code:
let remotes = await git.listRemotes({ fs, dir: '/tutorial' })
console.log(remotes)
Tip: If you need a clean slate, expand and run this snippet to clean up the file system.
window.fs = new LightningFS('fs', { wipe: true })
window.pfs = window.fs.promises
console.log('done')