https://github.com/slammayjammay/git-files
List git files
https://github.com/slammayjammay/git-files
es6 git javascript node
Last synced: 3 months ago
JSON representation
List git files
- Host: GitHub
- URL: https://github.com/slammayjammay/git-files
- Owner: slammayjammay
- License: mit
- Created: 2016-12-22T19:14:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-02T06:45:54.000Z (over 9 years ago)
- Last Synced: 2024-04-24T15:13:26.264Z (about 2 years ago)
- Topics: es6, git, javascript, node
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `git-files`
> Get all modified, deleted, staged, and untracked files
```js
const gitFiles = require('git-files')
console.log(gitFiles.all())
```
Specify the path type you want: `full` (default), `relative`, or `absolute`.
`full` paths give the file path from the root of the git directory, for example `src/js/index.js`.
`relative` gives the the file path relative to the current working directory.
`absolute` gives the entire file path from root.
Pass in the path type as a string.
```js
gitFiles.staged('full') // or gitFiles.staged()
gitFiles.untracked('absolute')
gitFiles.deleted('relative')
```