We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c76753a commit e091897Copy full SHA for e091897
README.md
@@ -1,3 +1,21 @@
1
## git-repo-info
2
3
-Retrieves repo information.
+Retrieves repo information without relying on the `git` command.
4
+
5
+### Usage
6
7
+```javascript
8
+var getRepoInfo = require('git-repo-info');
9
10
+var info = getRepoInfo();
11
12
+info.branch //=> will be the current branch
13
+info.sha //=> will be the current sha
14
+info.abbreviatedSha //=> will be the first 10 chars of the current sha
15
+```
16
17
+When called without any arguments, `git-repo-info` will automatically lookup upwards
18
+into parent directories to find the first match with a `.git` folder.
19
20
+If passed an argument, it will be assumed to be the path to the repo's `.git` folder
21
+to inspect.
0 commit comments