Socket
Socket
Sign inDemoInstall

git-commit-file

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-commit-file - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

appveyor.yml

7

package.json
{
"name": "git-commit-file",
"version": "1.0.8",
"version": "1.0.9",
"description": "Git add and commit a single file in a single command",

@@ -62,3 +62,6 @@ "author": "danday74",

"homepage": "https://github.com/danday74/git-commit-file#readme",
"comment": "coveralls@2.11.16"
"comment": "coveralls@2.11.16",
"engines": {
"node": ">= 4.8.0"
}
}

@@ -1,9 +0,105 @@

# git-commit-file
# git-commit-file (gcf)
[![build](https://img.shields.io/travis/danday74/git-commit-file/master.svg?label=linux)](https://travis-ci.org/danday74/git-commit-file)
[![linux](https://img.shields.io/travis/danday74/git-commit-file/master.svg?label=linux)](https://travis-ci.org/danday74/git-commit-file)
[![windows](https://img.shields.io/appveyor/ci/danday74/git-commit-file/master.svg?label=windows)](https://ci.appveyor.com/project/danday74/git-commit-file)
[![coverage](https://coveralls.io/repos/github/danday74/git-commit-file/badge.svg)](https://coveralls.io/github/danday74/git-commit-file)
[![npm](https://img.shields.io/npm/v/git-commit-file.svg)](https://www.npmjs.com/package/git-commit-file)
<br>[![npm](https://img.shields.io/npm/v/git-commit-file.svg)](https://www.npmjs.com/package/git-commit-file)
[![dependencies](https://david-dm.org/danday74/git-commit-file/status.svg)](https://david-dm.org/danday74/git-commit-file)
[![downloads](https://img.shields.io/npm/dm/git-commit-file.svg)](https://www.npmjs.com/package/git-commit-file)
[![node](https://img.shields.io/node/v/git-commit-file.svg)](https://www.npmjs.com/package/git-commit-file)
**Git add and commit a single file in a single command**
<br>
## Introduction
`git-commit-file` adds and commits a single file in a single command. No other files will ever be committed.
It can be installed either globally (for CLI usage) or locally (for usage in Node code).
Where a filename is specified `git-commit-file` attempts to commit that file only.
Where no filename is specified `git-commit-file` defaults to looking for `webpack.config.js` or `webpack.config.json`
If found it attempts to commit the file referenced by `output.filename` in your webpack config.
You don't like the default behaviour? Fine, always specify a file and `git-commit-file` will never fallback to the default.
<br>
## Global CLI Usage
`npm install -g git-commit-file`
Once installed you have access to the `git-commit-file` CLI command. This command has two aliases, namely `gcf` and `gitcommitfile`
``` bash
gcf README.md # add and commit README.md
gcf ./myFile.js # add and commit myFile.js
gcf myDir/myFile.js # add and commit myDir/myFile.js
gcf ./myDir/myFile.js # add and commit myDir/myFile.js
gcf # add and commit the file referenced by `output.filename` in your webpack config
```
`git-commit-file` exits with code 0 if the file was successfully committed else it exits with code 1
<br>
## Local usage
`npm install --save git-commit-file`
```javascript 1.7
const gcf = require('git-commit-file')
let exitCode
exitCode = gcf('myFile.js') // add and commit myFile.js
exitCode = gcf('./myFile.js') // add and commit myFile.js
exitCode = gcf('myDir/myFile.js') // add and commit myDir/myFile.js
exitCode = gcf('./myDir/myFile.js') // add and commit myDir/myFile.js
exitCode = gcf() // add and commit the file referenced by `output.filename` in your webpack config
```
With a local install `git-commit-file` can be accessed via `package.json` scripts:
```json
{
"scripts": {
"commit1": "gcf myFile.js",
"commit2": "git-commit-file ./myFile.js",
"commit3": "gcf myDir/myFile.js",
"commit4": "gitcommitfile ./myDir/myFile.js",
"commit5": "gitCommitFile"
}
}
```
And executed with `npm run commit1` or `npm run commit2` and so forth.
<br>
## Author says
God made a **commit**ment to loving you by sending his only Son Jesus to die on the cross for your sins in your place.
> For God so loved the world, that he gave his only Son, that whoever believes in him should not perish but have eternal life.
> For God did not send his Son into the world to condemn the world, but in order that the world might be saved through him.
> Whoever believes in him is not condemned, but whoever does not believe is condemned already, because he has not believed in the name of the only Son of God.
[John 3:16-18](https://www.bible.com/en-GB/bible/59/JHN.3.16-18.ESV "Jesus loves you")
Now it's your turn to make a **commit**ment to God. Shake His hand, accept His gift (he gave his only Son) and follow Him.
Remember ... It's a gift, you can't earn it. Take it and thank Him :)
<br><br><br>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc