1. git-toplevel
Method to find the top level git directory
git-toplevel
Package: git-toplevel
Created by: royriojas
Last modified: Sat, 18 Jun 2022 08:36:45 GMT
Version: 1.1.1
License: MIT
Downloads: 17,068
Repository: https://github.com/royriojas/git-toplevel

Install

npm install git-toplevel
yarn add git-toplevel

NPM Version
Build Status

git-toplevel

Method to find the top level git directory

Install

 npm i --save git-toplevel

Usage

 var gitTopLevel = require('git-toplevel');

gitTopLevel().then(function(dir) {
  // dir ===> the git root 
}).catch(function(err) {
  // err ===> any error that happen when trying to get the top level dir
});

Lincense

MIT

Changelog

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code